Refactor out an old cooldown system (#22179)

You can do this a lot more efficiently with world time cooldowns,
avoiding the need for spawn counters
This commit is contained in:
oranges
2016-12-18 10:11:50 +01:00
committed by AnturK
parent e5e4b7dcc6
commit 395637363d
7 changed files with 22 additions and 42 deletions
+4 -7
View File
@@ -42,15 +42,12 @@
/obj/item/device/assembly/timer/proc/timer_end()
if((!secured)||(cooldown > 0))
return 0
if(!secured || next_activate > world.time)
return FALSE
pulse(0)
audible_message("\icon[src] *beep* *beep*", null, 3)
cooldown = 2
spawn(10)
process_cooldown()
if(loop)
timing = 1
if(loop)
timing = 1
update_icon()