mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-20 14:45:05 +00:00
* Refactors chameleon actions, Adds chameleon outfit saving, Adds chameleon scanner * Update cards_ids.dm * Update _glasses.dm * Delete chameleon.dm * Update _glasses.dm * Update _glasses.dm --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
21 lines
615 B
Plaintext
21 lines
615 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_PRE_EMP_ACT, PROC_REF(getEmpFlags))
|
|
|
|
/datum/element/empprotection/Detach(atom/target)
|
|
UnregisterSignal(target, COMSIG_ATOM_PRE_EMP_ACT)
|
|
return ..()
|
|
|
|
/datum/element/empprotection/proc/getEmpFlags(datum/source, severity)
|
|
SIGNAL_HANDLER
|
|
|
|
return flags
|