mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Radiation Refactor (#19270)
* Part 1 * WIP * The rest of these * More stuff * Whoops, did that wrong * typo * gweeen * This all works * SHOWER * Rads * awa * rad * Update life.dm * edits * Makes lvl 3 rads give you a warning. You should already know by this point, but this makes it EXTRA clear you're getting fucked * Update vorestation.dme * aaa * propagate * gwah * more fixes * AAA * Update radiation.dm * Update radiation.dm * mobs rads * rads * fix this * Update _reagents.dm * these * Get rid of these * rad * Update config.txt * fixed * Update radiation_effects.dm
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/// 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
|
||||
|
||||
/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_ATOM_EXAMINE, PROC_REF(on_examine))
|
||||
|
||||
/datum/element/radiation_protected_clothing/Detach(datum/source, ...)
|
||||
REMOVE_TRAIT(source, TRAIT_RADIATION_PROTECTED_CLOTHING, REF(src))
|
||||
UnregisterSignal(source, COMSIG_ATOM_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>.")
|
||||
Reference in New Issue
Block a user