mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-11 16:14:08 +01:00
e49e13b795
## About The Pull Request Phobias have been refactored to use the new fear system instead of handling their effects via simple triggers on themselves. The overall idea is still the same, triggering upon seeing/hearing/saying a scary word or thing, but instead of instantly sending you into a panic it adds some fear and has a chance of triggering a new startle fear effect, which mirrors some of the previous phobia effects that weren't already included in other handlers. To complete the phobic trio, I've added monophobia as a quirk - its quite interesting compared to nycto- and claustrophobia, as it forces you to stick to other people, thus indirectly incentivizing social interactions, and could make for actually interesting moments. Additionally, I've cleaned up some of the related code and added message CDs to all other handlers that were missing them as to avoid chat spam which could sometimes occur when the effect triggered far too frequently. ## Why It's Good For The Game Using the new system makes phobias much more immersive and interesting to play around, as they no longer absolutely cripple you to the point of making the game unplayable in case of some of them due to random stuns or knockouts. It also makes them natively interact with other phobias and quirks, which is a neat thing for character building. Currently getting a phobia basically forces you to go to medbay as to not risk randomly falling unconscious every once in a while if you roll a common one (like cyborgs, blood, doctors or authority), and picking one as a quirk is basically not an option. ## Changelog 🆑 add: Monophobia is now availible as a negative (-3) quirk. balance: Phobias now have accumulating, and less debilitating effects due to conversion to the new fear system. qol: Fear effects now have a cooldown between messages as to avoid chat spam. code: Cleaned up some of fear code. refactor: Refactored phobias to use the fear system /🆑
34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
/// Terror handlers, aka datums which determine current fear behaviors.
|
|
/// Separated into two groups, fear sources and fear effects, latter processing after all former are finished
|
|
/datum/terror_handler
|
|
/// Owner of this fear handler
|
|
var/mob/living/owner
|
|
/// Component which "houses" this handler
|
|
var/datum/component/fearful/component
|
|
/// Type of this handler, determines if it should run in the first or second batch
|
|
var/handler_type = TERROR_HANDLER_SOURCE
|
|
/// Is this a "default" handler? If so, it will be added to any fearful component unless its initialized with add_defaults = FALSE
|
|
var/default = FALSE
|
|
/// Other effects which should be disabled while this one is running
|
|
var/list/overrides
|
|
/// Is this handler bespoke, and always requires a new instance upon adding even when one is already present?
|
|
var/bespoke = FALSE
|
|
|
|
/datum/terror_handler/New(mob/living/new_owner, datum/component/fearful/new_component)
|
|
. = ..()
|
|
owner = new_owner
|
|
component = new_component
|
|
|
|
/datum/terror_handler/Destroy(force)
|
|
owner = null
|
|
component = null
|
|
return ..()
|
|
|
|
/// Single tick of terror handler, returns adjustment to terror buildup
|
|
/datum/terror_handler/proc/tick(seconds_per_tick, terror_buildup)
|
|
return 0
|
|
|
|
/// Additional effects when we're hugged by a mob, returns fear adjustment per hug. Should only be positive.
|
|
/datum/terror_handler/proc/on_hug(mob/living/hugger)
|
|
return 0
|