Files
VOREStation/code/game/objects/effects/map_effects/radiation_emitter.dm
T
Cameron Lennox cbc4151bfb 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
2026-03-22 12:29:09 -04:00

47 lines
1.1 KiB
Plaintext

// Constantly emites radiation from the tile it's placed on.
/obj/effect/map_effect/radiation_emitter
name = "radiation emitter"
icon_state = "radiation_emitter"
var/range = 3
var/radiation_power = 30 // Bigger numbers means more radiation.
var/last_event = 0
/// Mutex to prevent infinite recursion when propagating radiation pulses
var/active = null
var/strength = 50
/obj/effect/map_effect/radiation_emitter/process()
radiate()
..()
/obj/effect/map_effect/radiation_emitter/proc/radiate()
SIGNAL_HANDLER
if(active)
return
if(world.time <= last_event + 1.5 SECONDS)
return
active = TRUE
radiation_pulse(
src,
max_range = range,
threshold = RAD_LIGHT_INSULATION,
chance = radiation_power,
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
strength = strength
)
last_event = world.time
active = FALSE
/obj/effect/map_effect/radiation_emitter/Initialize(mapload)
START_PROCESSING(SSobj, src)
return ..()
/obj/effect/map_effect/radiation_emitter/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/map_effect/radiation_emitter/strong
range = 7
radiation_power = 100
strength = 250