mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-10 00:43:14 +00:00
* Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981) * Process procs now properly use deltatime when implementing rates, timers and probabilities * Review fixes * Geiger counters cleanup Made hardsuit geiger code more similar to geiger counter code Geiger counters are more responsive now * Moved SS*_DT defines to subsystems.dm * Rebase fix * Redefined the SS*_DT defines to use the subsystem wait vars * Implemented suggested changes by @AnturK * Commented /datum/proc/process about the deltatime stuff * Send delta_time as a process parameter instead of the defines Also DTfied acid_processing * Dtfied new acid component * Process procs now properly utilize deltatime when implementing rates, timers and probabilities Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
23 lines
751 B
Plaintext
23 lines
751 B
Plaintext
/obj/machinery/plumbing/disposer
|
|
name = "chemical disposer"
|
|
desc = "Breaks down chemicals and annihilates them."
|
|
icon_state = "disposal"
|
|
///we remove 5 reagents per second
|
|
var/disposal_rate = 5
|
|
|
|
/obj/machinery/plumbing/disposer/Initialize(mapload, bolt)
|
|
. = ..()
|
|
AddComponent(/datum/component/plumbing/simple_demand, bolt)
|
|
|
|
/obj/machinery/plumbing/disposer/process(delta_time)
|
|
if(machine_stat & NOPOWER)
|
|
return
|
|
if(reagents.total_volume)
|
|
if(icon_state != initial(icon_state) + "_working") //threw it here instead of update icon since it only has two states
|
|
icon_state = initial(icon_state) + "_working"
|
|
reagents.remove_any(disposal_rate * delta_time)
|
|
else
|
|
if(icon_state != initial(icon_state))
|
|
icon_state = initial(icon_state)
|
|
|