Files
Bubberstation/code/datums/elements/empprotection.dm
SkyratBot b4fd13b16b [MIRROR] Improve the naming of the element argument hash index selector [MDB IGNORE] (#17588)
* Improve the naming of the element argument hash index selector (#71319)

So confusing name

* Improve the naming of the element argument hash index selector

* sr sync

Co-authored-by: oranges <email@oranges.net.nz>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-21 16:27:40 -05:00

21 lines
607 B
Plaintext

/datum/element/empprotection
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH_ON_HOST_DESTROY // Detach for turfs
argument_hash_start_idx = 2
var/flags = NONE
/datum/element/empprotection/Attach(datum/target, _flags)
. = ..()
if(. == ELEMENT_INCOMPATIBLE || !isatom(target))
return ELEMENT_INCOMPATIBLE
flags = _flags
RegisterSignal(target, COMSIG_ATOM_EMP_ACT, PROC_REF(getEmpFlags))
/datum/element/empprotection/Detach(atom/target)
UnregisterSignal(target, COMSIG_ATOM_EMP_ACT)
return ..()
/datum/element/empprotection/proc/getEmpFlags(datum/source, severity)
SIGNAL_HANDLER
return flags