diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index 725630f412cfb..813fedfa18630 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -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" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 08080ba01b0f3..d75e959633899 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -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, diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 61975b7a673ed..d782864a4574b 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -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 @@ -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 diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 5271df3f8a909..6c3f175f66ede 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -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 @@ -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 @@ -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) @@ -61,7 +79,7 @@ /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) . = ..() @@ -69,7 +87,7 @@ //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