Files
LucyandGitHub 851c5a5df9 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
2025-02-01 21:21:44 +01:00

15 lines
401 B
Plaintext

/datum/status_effect/pacify
id = "pacify"
alert_type = null
/datum/status_effect/pacify/on_creation(mob/living/new_owner, duration = 10 SECONDS)
src.duration = duration
return ..()
/datum/status_effect/pacify/on_apply()
ADD_TRAIT(owner, TRAIT_PACIFISM, TRAIT_STATUS_EFFECT(id))
return TRUE
/datum/status_effect/pacify/on_remove()
REMOVE_TRAIT(owner, TRAIT_PACIFISM, TRAIT_STATUS_EFFECT(id))