diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 9dbde0bfe0..b3c2b241f3 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -134,6 +134,7 @@ #define TRAIT_NORUNNING "norunning" // You walk! #define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites. #define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat. +#define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events" //non-mob traits @@ -191,6 +192,7 @@ #define ABSTRACT_ITEM_TRAIT "abstract-item" #define STATUS_EFFECT_TRAIT "status-effect" #define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention +#define GHOSTROLE_TRAIT "ghostrole" // unique trait sources, still defines #define STATUE_MUTE "statue" diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index fdc85475fb..4304e275d1 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -30,6 +30,8 @@ new/obj/structure/fluff/empty_terrarium(get_turf(src)) return ..() +/obj/effect/mob_spawn/human/seed_vault/special(mob/living/carbon/human/new_spawn) + ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) //Ash walker eggs: Spawns in ash walker dens in lavaland. Ghosts become unbreathing lizards that worship the Necropolis and are advised to retrieve corpses to create more ash walkers. /obj/effect/mob_spawn/human/ash_walker @@ -251,6 +253,9 @@ new/obj/structure/fluff/empty_cryostasis_sleeper(get_turf(src)) return ..() +/obj/effect/mob_spawn/human/hermit/special(mob/living/carbon/human/new_spawn) + ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) + //Broken rejuvenation pod: Spawns in animal hospitals in lavaland. Ghosts become disoriented interns and are advised to search for help. /obj/effect/mob_spawn/human/doctor/alive/lavaland name = "broken rejuvenation pod" @@ -353,6 +358,9 @@ new/obj/structure/fluff/empty_sleeper/syndicate(get_turf(src)) ..() +/obj/effect/mob_spawn/human/hotel_staff/special(mob/living/carbon/human/new_spawn) + ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) + /obj/effect/mob_spawn/human/demonic_friend name = "Essence of friendship" desc = "Oh boy! Oh boy! A friend!" @@ -618,6 +626,7 @@ O.equip(new_spawn, FALSE, new_spawn.client) SSjob.equip_loadout(null, new_spawn, FALSE) SSquirks.AssignQuirks(new_spawn, new_spawn.client, TRUE, TRUE, null, FALSE, new_spawn) + ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) /datum/outfit/ghostcafe name = "ID, jumpsuit and shoes" @@ -639,4 +648,4 @@ uniform = /obj/item/clothing/under/color/random else uniform = /obj/item/clothing/under/skirt/color/random - + diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 07a399a1b6..00e3698e1e 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -37,6 +37,8 @@ continue if(!H.client) continue + if(HAS_TRAIT(H,TRAIT_EXEMPT_HEALTH_EVENTS)) + continue if(H.stat == DEAD) continue if(HAS_TRAIT(H, TRAIT_VIRUSIMMUNE)) //Don't pick someone who's virus immune, only for it to not do anything. diff --git a/code/modules/events/heart_attack.dm b/code/modules/events/heart_attack.dm index 8db2d98bf0..a47a8b81b4 100644 --- a/code/modules/events/heart_attack.dm +++ b/code/modules/events/heart_attack.dm @@ -9,7 +9,7 @@ /datum/round_event/heart_attack/start() var/list/heart_attack_contestants = list() for(var/mob/living/carbon/human/H in shuffle(GLOB.player_list)) - if(!H.client || H.stat == DEAD || H.InCritical() || !H.can_heartattack() || H.has_status_effect(STATUS_EFFECT_EXERCISED) || (/datum/disease/heart_failure in H.diseases) || H.undergoing_cardiac_arrest()) + if(!H.client || H.stat == DEAD || H.InCritical() || !H.can_heartattack() || H.has_status_effect(STATUS_EFFECT_EXERCISED) || (/datum/disease/heart_failure in H.diseases) || H.undergoing_cardiac_arrest() || HAS_TRAIT(H,TRAIT_EXEMPT_HEALTH_EVENTS)) continue if(H.satiety <= -60) //Multiple junk food items recently heart_attack_contestants[H] = 3 diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index 2b0c16ebfc..0553f69b5b 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -35,4 +35,6 @@ /datum/hallucination/delusion, /datum/hallucination/oh_yeah) for(var/mob/living/carbon/C in GLOB.alive_mob_list) + if (HAS_TRAIT(C,TRAIT_EXEMPT_HEALTH_EVENTS)) + continue new picked_hallucination(C, TRUE) \ No newline at end of file diff --git a/code/modules/events/spontaneous_appendicitis.dm b/code/modules/events/spontaneous_appendicitis.dm index 901337cd52..8ee943beb9 100644 --- a/code/modules/events/spontaneous_appendicitis.dm +++ b/code/modules/events/spontaneous_appendicitis.dm @@ -15,6 +15,8 @@ continue if(H.stat == DEAD) continue + if (HAS_TRAIT(H,TRAIT_EXEMPT_HEALTH_EVENTS)) + continue if(!H.getorgan(/obj/item/organ/appendix)) //Don't give the disease to some who lacks it, only for it to be auto-cured continue if(!(MOB_ORGANIC in H.mob_biotypes)) //biotype sleeper bugs strike again, once again making appendicitis pick a target that can't take it