Refactor another spawn cooldown

This commit is contained in:
Purpose
2018-09-16 12:03:41 +01:00
parent 657ea61c7d
commit 32e73e8f40
+5 -11
View File
@@ -87,15 +87,11 @@
var/obj/item/pipe/P = new (loc, pipe_type=p_type, dir=p_dir)
P.update()
P.add_fingerprint(usr)
wait = 1
spawn(10)
wait = 0
wait = world.time + 10
if(href_list["makemeter"])
if(!wait)
if(wait < world.time)
new /obj/item/pipe_meter(loc)
wait = 1
spawn(15)
wait = 0
wait = world.time + 15
if(href_list["makegsensor"])
if(!wait)
new /obj/item/pipe_gsensor(loc)
@@ -192,12 +188,10 @@
usr.set_machine(src)
add_fingerprint(usr)
if(!wait)
if(wait < world.time)
var/p_type = text2num(href_list["dmake"])
var/obj/structure/disposalconstruct/C = new(loc, p_type)
if(p_type in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE))
C.density = TRUE
C.add_fingerprint(usr)
wait = 1
spawn(15)
wait = 0
wait = world.time + 15