Replaces all instances of spawn() with addtimer/INVOKE_ASYNC
This commit is contained in:
@@ -555,9 +555,7 @@
|
||||
/obj/structure/disposalpipe/trunk/Initialize()
|
||||
. = ..()
|
||||
dpdir = dir
|
||||
spawn(1)
|
||||
getlinked()
|
||||
|
||||
getlinked()
|
||||
update()
|
||||
|
||||
/obj/structure/disposalpipe/trunk/Destroy()
|
||||
@@ -658,12 +656,11 @@
|
||||
else
|
||||
stored = new (src, DISP_END_OUTLET,dir)
|
||||
|
||||
spawn(1)
|
||||
target = get_ranged_target_turf(src, dir, 10)
|
||||
target = get_ranged_target_turf(src, dir, 10)
|
||||
|
||||
trunk = locate() in src.loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
/obj/structure/disposaloutlet/Destroy()
|
||||
if(trunk)
|
||||
|
||||
@@ -379,6 +379,11 @@
|
||||
else if(full_pressure)
|
||||
add_overlay("dispover-ready")
|
||||
|
||||
/obj/machinery/disposal/bin/proc/do_flush()
|
||||
set waitfor = FALSE
|
||||
SSblackbox.inc("disposal_auto_flush")
|
||||
flush()
|
||||
|
||||
//timed process
|
||||
//charge the gas reservoir and perform flush if ready
|
||||
/obj/machinery/disposal/bin/process()
|
||||
@@ -389,15 +394,13 @@
|
||||
if(flush_count >= flush_every_ticks)
|
||||
if(contents.len)
|
||||
if(full_pressure)
|
||||
spawn(0)
|
||||
SSblackbox.inc("disposal_auto_flush",1)
|
||||
flush()
|
||||
do_flush()
|
||||
flush_count = 0
|
||||
|
||||
updateDialog()
|
||||
|
||||
if(flush && air_contents.return_pressure() >= SEND_PRESSURE) // flush can happen even without power
|
||||
INVOKE_ASYNC(src, .proc/flush)
|
||||
do_flush()
|
||||
|
||||
if(stat & NOPOWER) // won't charge if no power
|
||||
return
|
||||
@@ -447,10 +450,9 @@
|
||||
/obj/machinery/disposal/deliveryChute/Initialize(mapload, obj/structure/disposalconstruct/make_from)
|
||||
. = ..()
|
||||
stored.ptype = DISP_END_CHUTE
|
||||
spawn(5)
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/place_item_in_disposal(obj/item/I, mob/user)
|
||||
if(I.disposalEnterTry())
|
||||
|
||||
Reference in New Issue
Block a user