Files
Bubberstation/code/datums/elements/radiation_protected_clothing.dm
T
e90627be0e [MIRROR] Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed [MDB IGNORE] (#9176)
* Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed

* Fixing conflicts

* Makes it compile, yeet all the RAD armor from everywhere (thanks RegEx!)

* Removing more lingering rad armor (woo)

* Damnit powerarmors

* Bye bye rad collectors!

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-11-02 10:36:46 -04:00

26 lines
954 B
Plaintext

/// Marks the item as being radiation protected.
/// Adds the TRAIT_RADIATION_PROTECTED_CLOTHING trait, as well as adding an
/// extra bit to the examine descrpition.
/datum/element/radiation_protected_clothing
element_flags = ELEMENT_DETACH
/datum/element/radiation_protected_clothing/Attach(datum/target)
. = ..()
if (!isclothing(target))
return ELEMENT_INCOMPATIBLE
ADD_TRAIT(target, TRAIT_RADIATION_PROTECTED_CLOTHING, REF(src))
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine)
/datum/element/radiation_protected_clothing/Detach(datum/source, ...)
REMOVE_TRAIT(source, TRAIT_RADIATION_PROTECTED_CLOTHING, REF(src))
UnregisterSignal(source, COMSIG_PARENT_EXAMINE)
return ..()
/datum/element/radiation_protected_clothing/proc/on_examine(datum/source, mob/user, list/examine_text)
SIGNAL_HANDLER
examine_text += span_notice("A patch with a hazmat sign on the side suggests it would <b>protect you from radiation</b>.")