From 24bb1e0c8f12f0ce1ac8193ece4b85dc01e5b4e7 Mon Sep 17 00:00:00 2001 From: Kylerace Date: Tue, 11 Jan 2022 00:13:54 -0800 Subject: [PATCH] makes people with the claustrophobia quirk fear santa claus (#63981) People with the claustrophobia quirk will now be afraid of Santa Claus and certain Claus-like entities --- code/datums/quirks/negative.dm | 36 ++++++++++++++++--- .../mob/living/carbon/carbon_defines.dm | 2 +- code/modules/mob/living/living_defines.dm | 2 +- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index 32729333a4f..5b48584e3c7 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -853,7 +853,7 @@ /datum/quirk/claustrophobia name = "Claustrophobia" - desc = "You are terrified of small spaces. If you are placed inside any container, locker, or machinery, a panic attack sets in and you struggle to breath." + desc = "You are terrified of small spaces and certain jolly figures. If you are placed inside any container, locker, or machinery, a panic attack sets in and you struggle to breath." icon = "box-open" value = -4 medical_record_text = "Patient demonstrates a fear of tight spaces." @@ -867,11 +867,37 @@ if(quirk_holder.stat != CONSCIOUS || quirk_holder.IsSleeping() || quirk_holder.IsUnconscious()) return - if(isturf(quirk_holder.loc)) + var/nick_spotted = FALSE + + for(var/mob/living/carbon/human/possible_claus in view(5, quirk_holder)) + if(evaluate_jolly_levels(possible_claus)) + nick_spotted = TRUE + break + + if(!nick_spotted && isturf(quirk_holder.loc)) SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "claustrophobia", /datum/mood_event/claustrophobia) - return - + return + SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "claustrophobia") quirk_holder.losebreath += 0.25 // miss a breath one in four times if(DT_PROB(25, delta_time)) - to_chat(quirk_holder, span_warning("You feel trapped! Must escape... can't breath...")) + if(nick_spotted) + to_chat(quirk_holder, span_warning("Santa Claus is here! I gotta get out of here!")) + else + to_chat(quirk_holder, span_warning("You feel trapped! Must escape... can't breath...")) + +///investigates whether possible_saint_nick possesses a high level of christmas cheer +/datum/quirk/claustrophobia/proc/evaluate_jolly_levels(mob/living/carbon/human/possible_saint_nick) + if(!istype(possible_saint_nick)) + return FALSE + + if(istype(possible_saint_nick.back, /obj/item/storage/backpack/santabag)) + return TRUE + + if(istype(possible_saint_nick.head, /obj/item/clothing/head/santa)) + return TRUE + + if(istype(possible_saint_nick.wear_suit, /obj/item/clothing/suit/space/santa)) + return TRUE + + return FALSE diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 765ead5145e..6c0bab0bed7 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -3,7 +3,7 @@ gender = MALE pressure_resistance = 15 hud_possible = list(HEALTH_HUD,STATUS_HUD,ANTAG_HUD,GLAND_HUD) - has_limbs = 1 + has_limbs = TRUE held_items = list(null, null) num_legs = 0 //Populated on init through list/bodyparts usable_legs = 0 //Populated on init through list/bodyparts diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 5f82e92cb27..4ec23033711 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -84,7 +84,7 @@ var/mob_size = MOB_SIZE_HUMAN var/mob_biotypes = MOB_ORGANIC var/metabolism_efficiency = 1 ///more or less efficiency to metabolize helpful/harmful reagents and regulate body temperature.. - var/has_limbs = 0 ///does the mob have distinct limbs?(arms,legs, chest,head) + var/has_limbs = FALSE ///does the mob have distinct limbs?(arms,legs, chest,head) ///How many legs does this mob have by default. This shouldn't change at runtime. var/default_num_legs = 2