22 lines
721 B
Plaintext
22 lines
721 B
Plaintext
/obj/machinery/plumbing/disposer
|
|
name = "chemical disposer"
|
|
desc = "Breaks down chemicals and annihilates them."
|
|
icon_state = "disposal"
|
|
///we remove 10 reagents per second
|
|
var/disposal_rate = 10
|
|
|
|
/obj/machinery/plumbing/disposer/Initialize(mapload, bolt)
|
|
. = ..()
|
|
AddComponent(/datum/component/plumbing/simple_demand, bolt)
|
|
|
|
/obj/machinery/plumbing/disposer/process()
|
|
if(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)
|
|
else
|
|
if(icon_state != initial(icon_state))
|
|
icon_state = initial(icon_state)
|