From c6fe13bf6c5f3d37d0c5d28f33a0cc65f69399b4 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Thu, 10 Aug 2023 21:48:44 -0500 Subject: [PATCH] Fix antimagic effect never expiring (#77500) ## About The Pull Request Fixes #77499 I messed this up resolving merge conflicts. ## Changelog :cl: Melbert fix: Fix antimagic effect not expiring /:cl: --- code/controllers/subsystem/timer.dm | 4 ++-- code/modules/mob/mob.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 9bd56294c69..7be217ffe71 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -579,8 +579,8 @@ SUBSYSTEM_DEF(timer) * * timer_subsystem the subsystem to insert this timer into */ /proc/_addtimer(datum/callback/callback, wait = 0, flags = 0, datum/controller/subsystem/timer/timer_subsystem, file, line) - if (!callback) - CRASH("addtimer called without a callback") + ASSERT(istype(callback), "addtimer called [callback ? "with an invalid callback ([callback])" : "without a callback"]") + ASSERT(isnum(wait), "addtimer called with a non-numeric wait ([wait])") if (wait < 0) stack_trace("addtimer called with a negative wait. Converting to [world.tick_lag]") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 51e6de5d49b..28a58b38558 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1036,7 +1036,7 @@ mob_light(range = 2, color = antimagic_color, duration = 5 SECONDS) add_overlay(antimagic_effect) - addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay)), antimagic_effect, 5 SECONDS) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay), antimagic_effect), 5 SECONDS) /** * Buckle a living mob to this mob. Also turns you to face the other mob