mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 02:51:41 +00:00
* 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>
21 lines
607 B
Plaintext
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
|