diff --git a/code/_globalvars/traumas.dm b/code/_globalvars/traumas.dm index 8a664d14f67..9b341a64376 100644 --- a/code/_globalvars/traumas.dm +++ b/code/_globalvars/traumas.dm @@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(phobia_types, sort_list(list( "anime", "authority", "birds", + "blood", "clowns", "doctors", "falling", @@ -46,6 +47,7 @@ GLOBAL_LIST_INIT(phobia_regexes, list( "spiders" = construct_phobia_regex("spiders"), "strangers" = construct_phobia_regex("strangers"), "the supernatural" = construct_phobia_regex("the supernatural"), + "blood" = construct_phobia_regex("blood"), )) GLOBAL_LIST_INIT(phobia_mobs, list( @@ -211,17 +213,11 @@ GLOBAL_LIST_INIT(phobia_objs, list( /obj/structure/statue/plasma/xeno )), - "birds" = typecacheof(list(/obj/item/clothing/mask/gas/plaguedoctor, /obj/item/food/cracker, - /obj/item/clothing/suit/chickensuit, /obj/item/clothing/head/chicken, - /obj/item/clothing/suit/toggle/owlwings, /obj/item/clothing/under/costume/owl, /obj/item/clothing/mask/gas/owl_mask, - /obj/item/clothing/under/costume/griffin, /obj/item/clothing/shoes/griffin, /obj/item/clothing/head/griffin, - /obj/item/clothing/head/helmet/space/freedom, /obj/item/clothing/suit/space/freedom, - )), - "anime" = typecacheof(list(/obj/item/clothing/under/costume/schoolgirl, /obj/item/katana, /obj/item/food/sashimi, /obj/item/food/chawanmushi, /obj/item/reagent_containers/food/drinks/bottle/sake, /obj/item/throwing_star, /obj/item/clothing/head/kitty/genuine, /obj/item/clothing/suit/space/space_ninja, /obj/item/clothing/mask/gas/space_ninja, /obj/item/clothing/shoes/space_ninja, /obj/item/clothing/gloves/space_ninja, /obj/item/vibro_weapon, - /obj/item/nullrod/scythe/vibro, /obj/item/energy_katana, /obj/item/toy/katana, /obj/item/nullrod/claymore/katana, /obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe)), + /obj/item/nullrod/scythe/vibro, /obj/item/energy_katana, /obj/item/toy/katana, /obj/item/nullrod/claymore/katana, /obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe + )), "birds" = typecacheof(list(/obj/item/clothing/mask/gas/plaguedoctor, /obj/item/food/cracker, /obj/item/clothing/suit/chickensuit, /obj/item/clothing/head/chicken, @@ -243,6 +239,8 @@ GLOBAL_LIST_INIT(phobia_objs, list( /obj/item/clothing/mask/gas/space_ninja, /obj/item/clothing/shoes/space_ninja, /obj/item/clothing/gloves/space_ninja, /obj/item/vibro_weapon, /obj/item/nullrod/scythe/vibro, /obj/item/energy_katana, /obj/item/toy/katana, /obj/item/nullrod/claymore/katana, /obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe )), + + "blood" = typecacheof(list(/obj/machinery/iv_drip, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/blood, /obj/effect/decal/cleanable/blood)), )) GLOBAL_LIST_INIT(phobia_turfs, list( diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 62abea4c688..9c4b5053841 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -48,13 +48,13 @@ var/list/seen_atoms = view(7, owner) if(LAZYLEN(trigger_objs)) for(var/obj/O in seen_atoms) - if(is_type_in_typecache(O, trigger_objs)) + if(is_type_in_typecache(O, trigger_objs) || (phobia_type == "blood" && HAS_BLOOD_DNA(O))) freak_out(O) return for(var/mob/living/carbon/human/HU in seen_atoms) //check equipment for trigger items for(var/X in HU.get_all_slots() | HU.held_items) var/obj/I = X - if(!QDELETED(I) && is_type_in_typecache(I, trigger_objs)) + if(!QDELETED(I) && (is_type_in_typecache(I, trigger_objs) || (phobia_type == "blood" && HAS_BLOOD_DNA(I)))) freak_out(I) return @@ -213,3 +213,7 @@ /datum/brain_trauma/mild/phobia/guns phobia_type = "guns" random_gain = FALSE + +/datum/brain_trauma/mild/phobia/blood + phobia_type = "blood" + random_gain = FALSE diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 3a4656b81e8..b6f2bb7a263 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -127,6 +127,11 @@ /datum/mood_event/nyctophobia description = "It sure is dark around here...\n" mood_change = -3 + +/datum/mood_event/claustrophobia + description = "Why do I feel trapped?! Let me out!!!\n" + mood_change = -7 + timeout = 1 MINUTES /datum/mood_event/bright_light description = "I hate it in the light...I need to find a darker place...\n" diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index e3305df5a81..32729333a4f 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -327,7 +327,7 @@ /datum/quirk/nyctophobia/proc/on_holder_moved(mob/living/source, atom/old_loc, dir, forced) SIGNAL_HANDLER - if(quirk_holder.stat == DEAD) + if(quirk_holder.stat != CONSCIOUS || quirk_holder.IsSleeping() || quirk_holder.IsUnconscious()) return var/mob/living/carbon/human/human_holder = quirk_holder @@ -481,7 +481,7 @@ processing_quirk = TRUE /datum/quirk/insanity/process(delta_time) - if(quirk_holder.stat == DEAD) + if(quirk_holder.stat != CONSCIOUS || quirk_holder.IsSleeping() || quirk_holder.IsUnconscious()) return if(DT_PROB(2, delta_time)) @@ -850,3 +850,28 @@ SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_touch", /datum/mood_event/very_bad_touch) else SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "bad_touch", /datum/mood_event/bad_touch) + +/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." + icon = "box-open" + value = -4 + medical_record_text = "Patient demonstrates a fear of tight spaces." + hardcore_value = 5 + processing_quirk = TRUE + +/datum/quirk/claustrophobia/remove() + SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "claustrophobia") + +/datum/quirk/claustrophobia/process(delta_time) + if(quirk_holder.stat != CONSCIOUS || quirk_holder.IsSleeping() || quirk_holder.IsUnconscious()) + return + + if(isturf(quirk_holder.loc)) + SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "claustrophobia", /datum/mood_event/claustrophobia) + 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...")) diff --git a/strings/phobia.json b/strings/phobia.json index 3259102c4cc..0b4be1a7133 100644 --- a/strings/phobia.json +++ b/strings/phobia.json @@ -391,5 +391,23 @@ "shell", "dart", "armory" + ], +"blood": [ + "blood", + "bloody", + "bloodloss", + "bleeding", + "bleed", + "bled", + "hemorrhaged", + "hemorrhage", + "hemorrhaging", + "transfusion", + "dialysis", + "iv", + "gore", + "gib", + "gibs", + "gibbed" ] }