Adds a macro for 0 wait timers as END_OF_TICK (#30309)

* Adds a macro for 0 wait timers as END_OF_TICK

* comment update
This commit is contained in:
Contrabang
2025-09-04 07:09:08 +00:00
committed by GitHub
parent e660a30e68
commit 19e1785eed
11 changed files with 15 additions and 12 deletions
@@ -60,7 +60,7 @@
// This includes maint loot spawners. The problem with that is if a closet loads before a spawner,
// the loot will just be in a pile. Adding a timer with 0 delay will cause it to only take in contents once the MC has loaded,
// therefore solving the issue on mapload. During rounds, everything will happen as normal
addtimer(CALLBACK(src, PROC_REF(take_contents)), 0)
END_OF_TICK(CALLBACK(src, PROC_REF(take_contents)))
populate_contents() // Spawn all its stuff
update_icon() // Set it to the right icon if needed
+1 -1
View File
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(safes)
for(var/i in 1 to number_of_tumblers)
tumblers.Add(rand(0, 99))
if(mapload)
addtimer(CALLBACK(src, PROC_REF(take_contents)), 0)
END_OF_TICK(CALLBACK(src, PROC_REF(take_contents)))
/obj/structure/safe/proc/take_contents()
// Put as many items on our turf inside as possible