From d9aab85f3ccae3be6b1cd2ae4e3430ae5db466ef Mon Sep 17 00:00:00 2001 From: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Date: Sun, 6 Nov 2022 02:53:36 -0800 Subject: [PATCH] Save 0.28s of init time by removing an unnecessary timer in light/LateInitialize (#71059) Replaces a timer with just calling the proc directly. This saves 0.28s of making timer events. This timer exists as an artifact of being a `spawn (1)` since r4407. Local testing suggests it is completely unnecessary (lights work, lights break, new lights show) --- code/modules/power/lighting/light.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/power/lighting/light.dm b/code/modules/power/lighting/light.dm index 6c995126438..4b3d1279f5a 100644 --- a/code/modules/power/lighting/light.dm +++ b/code/modules/power/lighting/light.dm @@ -101,7 +101,7 @@ if("bulb") if(prob(5)) break_light_tube(TRUE) - addtimer(CALLBACK(src, .proc/update, FALSE), 0.1 SECONDS) + update(trigger = FALSE) /obj/machinery/light/Destroy() var/area/local_area =get_room_area(src)