Implements some unused mood events into their relevant phobias. (#83796)

Implements some unused mood events found in #83741

🆑 ShizCalev
fix: Seeing heretical stuff while having the heresy phobia will now
apply the heresy mood event.
fix: Seeing skeletons while having the skeleton phobia will now apply
the spooked (by skeletons) mood event.
/🆑
This commit is contained in:
Afevis
2024-06-08 19:19:03 -04:00
committed by GitHub
parent 9e11a5c71d
commit d5990c31d2
+11
View File
@@ -10,6 +10,9 @@
/// Cooldown for freakouts to prevent permastunning.
COOLDOWN_DECLARE(scare_cooldown)
///What mood event to apply when we see the thing & freak out.
var/datum/mood_event/mood_event_type
var/regex/trigger_regex
//instead of cycling every atom, only cycle the relevant types
var/list/trigger_mobs
@@ -34,6 +37,10 @@
trigger_species = GLOB.phobia_species[phobia_type]
..()
/datum/brain_trauma/mild/phobia/on_lose(silent)
owner.clear_mood_event("phobia_[phobia_type]")
return ..()
/datum/brain_trauma/mild/phobia/on_life(seconds_per_tick, times_fired)
..()
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
@@ -107,6 +114,8 @@
COOLDOWN_START(src, scare_cooldown, 12 SECONDS)
if(owner.stat == DEAD)
return
if(mood_event_type)
owner.add_mood_event("phobia_[phobia_type]", mood_event_type)
var/message = pick("spooks you to the bone", "shakes you up", "terrifies you", "sends you into a panic", "sends chills down your spine")
if(reason)
to_chat(owner, span_userdanger("Seeing [span_phobia(reason.name)] [message]!"))
@@ -193,6 +202,7 @@
/datum/brain_trauma/mild/phobia/heresy
phobia_type = "heresy"
mood_event_type = /datum/mood_event/heresy
random_gain = FALSE
/datum/brain_trauma/mild/phobia/insects
@@ -217,6 +227,7 @@
/datum/brain_trauma/mild/phobia/skeletons
phobia_type = "skeletons"
mood_event_type = /datum/mood_event/spooked
random_gain = FALSE
/datum/brain_trauma/mild/phobia/snakes