Files
Bubberstation/code/modules/plumbing/plumbers/destroyer.dm
SkyratBot 1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* 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>
2020-09-09 08:19:23 +02:00

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)