Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zombies can heal in stasis #12145

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOSLIPWATER "noslip_water"
/// Stops all slipping and sliding from ocurring
#define TRAIT_NOSLIPALL "noslip_all"
//Inherent trait preventing effects of stasis on a mob
#define TRAIT_NOSTASIS "no_stasis"

/// Unlinks gliding from movement speed, meaning that there will be a delay between movements rather than a single move movement between tiles
#define TRAIT_NO_GLIDE "no_glide"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOMETABOLISM" = TRAIT_NOMETABOLISM,
"TRAIT_POWERHUNGRY" = TRAIT_POWERHUNGRY,
"TRAIT_NOCLONELOSS" = TRAIT_NOCLONELOSS,
"TRAIT_NOSTASIS" = TRAIT_NOSTASIS,
"TRAIT_TOXIMMUNE" = TRAIT_TOXIMMUNE,
"TRAIT_EASYDISMEMBER" = TRAIT_EASYDISMEMBER,
"TRAIT_LIMBATTACHMENT" = TRAIT_LIMBATTACHMENT,
Expand Down
5 changes: 4 additions & 1 deletion code/game/machinery/stasis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
return
var/freq = rand(24750, 26550)
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = freq)
//we could check inherent_traits, but thats too many var defines. KISS principle.
if(HAS_TRAIT(target, TRAIT_NOSTASIS))
return
target.apply_status_effect(STATUS_EFFECT_STASIS, STASIS_MACHINE_EFFECT)
target.ExtinguishMob()
use_power = ACTIVE_POWER_USE
Expand All @@ -146,7 +149,7 @@
update_icon()

/obj/machinery/stasis/process()
if( !( occupant && isliving(occupant) && check_nap_violations() ) )
if(!(occupant && isliving(occupant) && check_nap_violations()))
use_power = IDLE_POWER_USE
return
var/mob/living/L_occupant = occupant
Expand Down
40 changes: 29 additions & 11 deletions code/modules/mob/living/carbon/human/species_types/zombies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,35 @@
id = "zombie"
sexes = 0
meat = /obj/item/food/meat/slab/human/mutant/zombie
species_traits = list(NOBLOOD,NOZOMBIE,NOTRANSSTING)
inherent_traits = list(TRAIT_TOXIMMUNE,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_EASYDISMEMBER,\
TRAIT_LIMBATTACHMENT,TRAIT_NOBREATH,TRAIT_NODEATH,TRAIT_FAKEDEATH,TRAIT_NOCLONELOSS, TRAIT_FAST_CUFF_REMOVAL)
species_traits = list(
NOBLOOD,
NOZOMBIE,
NOTRANSSTING
)
inherent_traits = list(
TRAIT_EASYDISMEMBER,
TRAIT_FAKEDEATH,
TRAIT_FAST_CUFF_REMOVAL,
TRAIT_LIMBATTACHMENT,
TRAIT_NOBREATH,
TRAIT_NOCLONELOSS,
TRAIT_NODEATH,
TRAIT_NOHUNGER,
TRAIT_NOMETABOLISM,
TRAIT_RADIMMUNE,
TRAIT_RESISTCOLD,
TRAIT_RESISTHIGHPRESSURE,
TRAIT_RESISTLOWPRESSURE,
TRAIT_TOXIMMUNE,
TRAIT_NOSTASIS
)
inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID)
mutanttongue = /obj/item/organ/tongue/zombie
var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg')
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | ERT_SPAWN
bodytemp_normal = T0C // They have no natural body heat, the environment regulates body temp
bodytemp_heat_damage_limit = FIRE_MINIMUM_TEMPERATURE_TO_EXIST // Take damage at fire temp
bodytemp_cold_damage_limit = MINIMUM_TEMPERATURE_TO_MOVE // take damage below minimum movement temp

species_chest = /obj/item/bodypart/chest/zombie
species_head = /obj/item/bodypart/head/zombie
Expand All @@ -21,10 +43,6 @@
species_l_leg = /obj/item/bodypart/l_leg/zombie
species_r_leg = /obj/item/bodypart/r_leg/zombie

bodytemp_normal = T0C // They have no natural body heat, the environment regulates body temp
bodytemp_heat_damage_limit = FIRE_MINIMUM_TEMPERATURE_TO_EXIST // Take damage at fire temp
bodytemp_cold_damage_limit = MINIMUM_TEMPERATURE_TO_MOVE // take damage below minimum movement temp

/datum/species/zombie/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
Expand All @@ -44,9 +62,9 @@
armor = 20 // 120 damage to KO a zombie, which kills it
speedmod = 1.6
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
var/heal_rate = 1
var/regen_cooldown = 0
changesource_flags = MIRROR_BADMIN | WABBAJACK | ERT_SPAWN
var/heal_rate = 1
COOLDOWN_DECLARE(regen_cooldown)

/// Zombies do not stabilize body temperature they are the walking dead and are cold blooded
/datum/species/zombie/body_temperature_core(mob/living/carbon/human/humi)
Expand All @@ -61,15 +79,15 @@
/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H, forced = FALSE)
. = ..()
if(.)
regen_cooldown = world.time + REGENERATION_DELAY
COOLDOWN_START(src, regen_cooldown, REGENERATION_DELAY)

/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
. = ..()
C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW

//Zombies never actually die, they just fall down until they regenerate enough to rise back up.
//They must be restrained, beheaded or gibbed to stop being a threat.
if(regen_cooldown < world.time)
if(COOLDOWN_FINISHED(src, regen_cooldown))
var/heal_amt = heal_rate
if(HAS_TRAIT(C, TRAIT_CRITICAL_CONDITION))
heal_amt *= 2
Expand Down
Loading