Makes the assembly cooldown happen before it triggers. Stopping an infinite loop

This commit is contained in:
joep van der velden
2020-06-24 14:17:56 +02:00
parent 4546c11435
commit 63845ef242
5 changed files with 12 additions and 18 deletions
+3 -4
View File
@@ -39,12 +39,11 @@
/obj/item/assembly/timer/proc/timer_end()
if(!secured || cooldown > 0)
return FALSE
pulse(0)
cooldown = 2
pulse(FALSE)
if(loc)
loc.visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
cooldown = 2
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
/obj/item/assembly/timer/process()
if(timing && (time > 0))