mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user