mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Convert all traits given by status effects to use TRAIT_STATUS_EFFECT(id) (#89291)
## About The Pull Request This makes (almost?) all traits given by status effects use `TRAIT_STATUS_EFFECT(id)` as their source, rather than the previous mix of `id`, `type`, `REF(src)`, or some bespoke thing. ## Why It's Good For The Game Consistency is good. ## Changelog No user-facing changes
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
. = ..()
|
||||
if (!.)
|
||||
return FALSE
|
||||
owner.add_traits(list(TRAIT_OVERWATCHED, TRAIT_OVERWATCH_IMMUNE), TRAIT_STATUS_EFFECT(id))
|
||||
owner.add_traits(list(TRAIT_OVERWATCHED, TRAIT_OVERWATCH_IMMUNE), REF(src))
|
||||
owner.do_alert_animation()
|
||||
owner.Immobilize(0.25 SECONDS) // Just long enough that they don't trigger it by mistake
|
||||
owner.playsound_local(owner, 'sound/machines/chime.ogg', 50, TRUE)
|
||||
@@ -109,7 +109,7 @@
|
||||
/datum/status_effect/overwatch/on_remove()
|
||||
UnregisterSignal(owner, forbidden_actions + list(COMSIG_QDELETING, COMSIG_LIVING_DEATH))
|
||||
QDEL_NULL(link)
|
||||
owner.remove_traits(list(TRAIT_OVERWATCHED, TRAIT_OVERWATCH_IMMUNE), TRAIT_STATUS_EFFECT(id))
|
||||
owner.remove_traits(list(TRAIT_OVERWATCHED, TRAIT_OVERWATCH_IMMUNE), REF(src))
|
||||
if (!QDELETED(owner))
|
||||
owner.apply_status_effect(/datum/status_effect/overwatch_immune)
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user