Skip to content

Commit

Permalink
Merge pull request #2 from xDanilcusx/facehugger-funny
Browse files Browse the repository at this point in the history
Danilcus huggers
  • Loading branch information
VoiceInYourHead committed Feb 17, 2024
2 parents 1b37af6 + 846f33d commit bf78cdf
Show file tree
Hide file tree
Showing 34 changed files with 261 additions and 107 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
#define XENO_EXPLOSIVE_ARMOR_TIER_10 100

// Health bands
#define XENO_HEALTH_LARVA 35 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_LARVA 45 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_LESSER_DRONE 160 * XENO_UNIVERSAL_HPMULT
#define XENO_HEALTH_RUNNER 230 * XENO_UNIVERSAL_HPMULT // Killed by 1 PB
#define XENO_HEALTH_TIER_1 250 * XENO_UNIVERSAL_HPMULT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
if(!.)
return

if(isfacehugger(checked_xeno))
return FALSE

var/mob/parent_mob = parent

var/captee_stat = parent_mob.stat
Expand Down
5 changes: 5 additions & 0 deletions code/game/machinery/medical_pod/autodoc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@
S.limb_ref.implants -= I
H.embedded_items -= I
qdel(I)
var/obj/item/larva_ref = locate(/obj/item/alien_embryo) in H.contents
if(S.limb_ref.name == "chest" && larva_ref)
sleep(REMOVE_OBJECT_MAX_DURATION*surgery_mod)
H.contents -= larva_ref
qdel(larva_ref)
if(S.limb_ref.name == "chest" || S.limb_ref.name == "head")
close_encased(H,S.limb_ref)
if(!surgery) break
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

// Spawn stuff
#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER)
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_FACEHUGGER)
#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER)
#define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER)
#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL

#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
Expand Down
1 change: 0 additions & 1 deletion code/modules/character_traits/hair_dye.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
trait_name = "Hair Dye"
trait_desc = "Enables hair gradients in the character creation screen."
applyable = TRUE
cost = 1
trait_group = /datum/character_trait_group/hair_dye
refresh_choices = TRUE
refresh_mannequin = TRUE
11 changes: 9 additions & 2 deletions code/modules/clothing/suits/marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1475,9 +1475,10 @@
flags_inventory = BLOCKSHARPOBJ|SMARTGUN_HARNESS

/obj/item/clothing/suit/storage/CMB
name = "\improper CMB jacket"
desc = "A black jacket worn by Colonial Marshals. The back is enscribed with the powerful letters of 'MARSHAL' representing justice, authority, and protection in the outer rim. The laws of the Earth stretch beyond the Sol."
name = "\improper CMB Deputy jacket"
desc = "A thick and stylish black leather jacket with a Marshal's Deputy badge pinned to it. The back is enscribed with the powerful letters of 'DEPUTY' representing justice, authority, and protection in the outer rim. The laws of the Earth stretch beyond the Sol."
icon_state = "CMB_jacket"
item_state = "CMB_jacket"
blood_overlay_type = "coat"
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS
flags_cold_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_ARMS
Expand Down Expand Up @@ -1524,6 +1525,12 @@
)
pockets.max_storage_space = 8

/obj/item/clothing/suit/storage/CMB/marshal
name = "\improper CMB Marshal jacket"
desc = "A thick and stylish black leather jacket with a Marshal's badge pinned to it. The back is enscribed with the powerful letters of 'MARSHAL' representing justice, authority, and protection in the outer rim. The laws of the Earth stretch beyond the Sol."
icon_state = "CMB_jacket_marshal"
item_state = "CMB_jacket_marshal"

/obj/item/clothing/suit/storage/RO
name = "quartermaster jacket"
desc = "A green jacket worn by USCM personnel. The back has the flag of the United Americas on it."
Expand Down
16 changes: 14 additions & 2 deletions code/modules/clothing/suits/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
valid_accessory_slots = list(ACCESSORY_SLOT_MEDAL)

/obj/item/clothing/suit/storage/apron/overalls
name = "coveralls"
desc = "A set of denim overalls."
name = "blue coveralls"
desc = "A pair of denim overalls. With a large pocket in the front these overalls are popular with workers of all kinds."
icon_state = "overalls"
item_state = "overalls"
flags_armor_protection = BODY_FLAG_CHEST|BODY_FLAG_GROIN|BODY_FLAG_LEGS
Expand All @@ -167,6 +167,18 @@
)
valid_accessory_slots = list(ACCESSORY_SLOT_MEDAL)

/obj/item/clothing/suit/storage/apron/overalls/tan
name = "tan coveralls"
desc = "A pair of tan overalls. With a large pocket in the front these overalls are popular with workers of all kinds."
icon_state = "overalls_tan"
item_state = "overalls_tan"

/obj/item/clothing/suit/storage/apron/overalls/red
name = "red coveralls"
desc = "A pair of reddish-brown overalls. With a large pocket in the front these overalls are popular with workers of all kinds."
icon_state = "overalls_red"
item_state = "overalls_red"

/obj/item/clothing/suit/syndicatefake
name = "red space suit replica"
icon_state = "syndicate"
Expand Down
38 changes: 36 additions & 2 deletions code/modules/clothing/under/marine_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,40 @@
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_COLONIST

/obj/item/clothing/under/colonist/workwear
name = "grey workwear"
desc = "A pair of black slacks and a short-sleeve grey workshirt. Standard uniform for Weyland Yutani employees working in colony operations and administration."
icon_state = "workwear_grey"
worn_state = "workwear_grey"

/obj/item/clothing/under/colonist/workwear/khaki
name = "khaki workwear"
desc = "A pair of jeans paired with a khaki workshirt. A common pairing among blue-collar workers due to its drab look."
icon_state = "workwear_khaki"
worn_state = "workwear_khaki"
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE|UNIFORM_JACKET_REMOVABLE

/obj/item/clothing/under/colonist/workwear/pink
name = "pink workwear"
desc = "A pair of jeans paired with a pink workshirt. Pink? Your wife might not think so, but such outlandish attire deserves questioning by corporate security. What are you, some kind of free-thinking anarchist?"
icon_state = "workwear_pink"
worn_state = "workwear_pink"
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE|UNIFORM_JACKET_REMOVABLE

/obj/item/clothing/under/colonist/workwear/blue
name = "blue workwear"
desc = "A pair of brown canvas workpants paired with a dark blue workshirt. A common pairing among blue-collar workers."
icon_state = "workwear_blue"
worn_state = "workwear_blue"
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE|UNIFORM_JACKET_REMOVABLE

/obj/item/clothing/under/colonist/workwear/green
name = "green workwear"
desc = "A pair of brown canvas workpants paired with a green workshirt. An common pairing among blue-collar workers."
icon_state = "workwear_green"
worn_state = "workwear_green"
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE|UNIFORM_JACKET_REMOVABLE

/obj/item/clothing/under/colonist/clf
name = "\improper Colonial Liberation Front uniform"
desc = "A stylish grey-green jumpsuit - standard issue for colonists. This version appears to have the symbol of the Colonial Liberation Front emblazoned in select areas."
Expand Down Expand Up @@ -754,7 +788,7 @@

/obj/item/clothing/under/CM_uniform
name = "\improper Colonial Marshal uniform"
desc = "A blue shirt and tan trousers - the official uniform for a Colonial Marshal."
desc = "A pair of off-white slacks and a blue button-down shirt with a dark brown tie; the standard uniform of the Colonial Marshals."
icon_state = "marshal"
worn_state = "marshal"
armor_melee = CLOTHING_ARMOR_LOW
Expand All @@ -765,7 +799,7 @@
armor_bio = CLOTHING_ARMOR_NONE
armor_rad = CLOTHING_ARMOR_NONE
armor_internaldamage = CLOTHING_ARMOR_LOW

flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE|UNIFORM_JACKET_REMOVABLE

/obj/item/clothing/under/liaison_suit
name = "liaison's tan suit"
Expand Down
39 changes: 8 additions & 31 deletions code/modules/cm_aliens/structures/egg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
icon_state = "Egg Growing"
density = FALSE
anchored = TRUE
layer = LYING_BETWEEN_MOB_LAYER //to stop hiding eggs under corpses
layer = RESIN_STRUCTURE_LAYER //so facehuggers will be above the eggs
health = 80
plane = GAME_PLANE
var/list/egg_triggers = list()
var/status = EGG_GROWING //can be EGG_GROWING, EGG_GROWN, EGG_BURST, EGG_BURSTING, or EGG_DESTROYED; all mutually exclusive
var/on_fire = FALSE
var/hivenumber = XENO_HIVE_NORMAL
var/flags_embryo = NO_FLAGS
var/trigger_radius = 2

/obj/effect/alien/egg/Initialize(mapload, hive)
. = ..()
create_egg_triggers()
if (hive)
hivenumber = hive

Expand Down Expand Up @@ -93,21 +93,10 @@
update_icon()
deploy_egg_triggers()

/obj/effect/alien/egg/proc/create_egg_triggers()
for(var/i in 1 to 8)
egg_triggers += new /obj/effect/egg_trigger(src, src)

/obj/effect/alien/egg/proc/deploy_egg_triggers()
var/i = 1
var/x_coords = list(-1,-1,-1,0,0,1,1,1)
var/y_coords = list(1,0,-1,1,-1,1,0,-1)
var/turf/target_turf
for(var/trigger in egg_triggers)
var/obj/effect/egg_trigger/ET = trigger
target_turf = locate(x+x_coords[i],y+y_coords[i], z)
if(target_turf)
ET.forceMove(target_turf)
i++
var/list/observed_turfs = orange(trigger_radius, src)
for(var/target_turf in observed_turfs)
egg_triggers += new /obj/effect/egg_trigger(target_turf, src)

/obj/effect/alien/egg/proc/hide_egg_triggers()
for(var/trigger in egg_triggers)
Expand Down Expand Up @@ -136,20 +125,8 @@
status = EGG_BURST
if(is_hugger_player_controlled)
return //Don't need to spawn a hugger, a player controls it already!
var/obj/item/clothing/mask/facehugger/child = new(loc, hivenumber)

child.flags_embryo = flags_embryo
flags_embryo = NO_FLAGS // Lose the embryo flags when passed on

if(X && X.caste.can_hold_facehuggers && (!X.l_hand || !X.r_hand)) //sanity checks
X.put_in_hands(child)
return

if(instant_trigger)
if(!child.leap_at_nearest_target())
child.return_to_egg(src)
else
child.go_idle()
new /mob/living/carbon/xenomorph/facehugger(loc, null, hivenumber)

/obj/effect/alien/egg/bullet_act(obj/projectile/P)
..()
Expand Down Expand Up @@ -286,9 +263,9 @@
/obj/effect/egg_trigger/Crossed(atom/movable/AM)
if(!linked_egg && !linked_eggmorph) //something went very wrong.
qdel(src)
else if(linked_egg && (get_dist(src, linked_egg) != 1 || !isturf(linked_egg.loc))) //something went wrong
else if(linked_egg && (get_dist(src, linked_egg) > linked_egg.trigger_radius || !isturf(linked_egg.loc))) //something went wrong
forceMove(linked_egg)
else if(linked_eggmorph && (get_dist(src, linked_eggmorph) != 1 || !isturf(linked_eggmorph.loc))) //something went wrong
else if(linked_eggmorph && (get_dist(src, linked_eggmorph) > linked_egg.trigger_radius || !isturf(linked_eggmorph.loc))) //something went wrong
forceMove(linked_eggmorph)
else if(iscarbon(AM))
var/mob/living/carbon/C = AM
Expand Down
7 changes: 5 additions & 2 deletions code/modules/cm_marines/Donator_Items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,11 @@
icon_state = null
item_state = null
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
//DON'T GRAB STUFF BETWEEN THIS LINE
//AND THIS LINE

item_icons = list(
WEAR_BODY = 'icons/mob/humans/onmob/uniform_1.dmi',
)

//END UNIFORM TEMPLATE

/obj/item/clothing/under/marine/fluff/marinemedic //UNUSED
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/revolver/cmb/normalpoint, WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/holobadge/cord, WEAR_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar, WEAR_FACE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/CMB, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/CMB/marshal, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/shotgun/pump/dual_tube/cmb/m3717, WEAR_J_STORE)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/Facehuggers.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MIN_IMPREGNATION_TIME 10 SECONDS //Time it takes to impregnate someone
#define MAX_IMPREGNATION_TIME 15 SECONDS
#define MIN_IMPREGNATION_TIME 30 SECONDS //Time it takes to impregnate someone
#define MAX_IMPREGNATION_TIME 40 SECONDS

#define MIN_ACTIVE_TIME 5 SECONDS //Time between being dropped and going idle
#define MAX_ACTIVE_TIME 15 SECONDS
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@
to_chat(src, SPAN_WARNING("[current_airlock] is locked down tight. You can't squeeze underneath!"))
return FALSE
visible_message(SPAN_WARNING("[src] scuttles underneath [current_structure]!"), \
SPAN_WARNING("You squeeze and scuttle underneath [current_structure]."), max_distance = 5)
SPAN_WARNING("You squeeze and scuttle underneath [current_structure]."), max_distance = 2)
forceMove(current_structure.loc)
return TRUE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
action_type = XENO_ACTION_CLICK
ability_primacy = XENO_PRIMARY_ACTION_3

default_ai_action = TRUE

/datum/action/xeno_action/activable/throw_hugger/action_cooldown_check()
if(owner)
var/mob/living/carbon/xenomorph/carrier/X = owner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
X.throw_hugger(A)
return ..()

/datum/action/xeno_action/activable/throw_hugger/process_ai(mob/living/carbon/xenomorph/X, delta_time)
var/distance = get_dist(X, X.current_target)
if(!DT_PROB(ai_prob_chance, delta_time) || distance < 3 || distance > 8)
return

use_ability_async(X.current_target)

/datum/action/xeno_action/activable/retrieve_egg/use_ability(atom/A)
var/mob/living/carbon/xenomorph/carrier/X = owner
X.retrieve_egg(A)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
freeze_time = 5
freeze_play_sound = FALSE
can_be_shield_blocked = TRUE

ai_prob_chance = 45
Loading

0 comments on commit bf78cdf

Please sign in to comment.