mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-28 10:31:59 +00:00
* 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>
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
#define DELAY_BETWEEN_RADIATION_PULSES (3 SECONDS)
|
|
|
|
/// This atom will regularly pulse radiation.
|
|
/// As this is only applied on uranium objects for now, this defaults to uranium constants.
|
|
/datum/element/radioactive
|
|
element_flags = ELEMENT_DETACH
|
|
|
|
var/list/radioactive_objects = list()
|
|
|
|
/datum/element/radioactive/New()
|
|
START_PROCESSING(SSdcs, src)
|
|
|
|
/datum/element/radioactive/Attach(datum/target)
|
|
. = ..()
|
|
|
|
radioactive_objects[target] = world.time
|
|
|
|
/datum/element/radioactive/Detach(datum/source, ...)
|
|
radioactive_objects -= source
|
|
|
|
return ..()
|
|
|
|
/datum/element/radioactive/process(delta_time)
|
|
for (var/radioactive_object in radioactive_objects)
|
|
if (world.time - radioactive_objects[radioactive_object] < DELAY_BETWEEN_RADIATION_PULSES)
|
|
continue
|
|
|
|
radiation_pulse(
|
|
radioactive_object,
|
|
max_range = 3,
|
|
threshold = RAD_LIGHT_INSULATION,
|
|
chance = URANIUM_IRRADIATION_CHANCE,
|
|
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
|
)
|
|
|
|
radioactive_objects[radioactive_object] = world.time
|
|
|
|
#undef DELAY_BETWEEN_RADIATION_PULSES
|