diff --git a/code/__DEFINES/MC.dm b/code/__DEFINES/MC.dm index c211b98d434..86c43d15907 100644 --- a/code/__DEFINES/MC.dm +++ b/code/__DEFINES/MC.dm @@ -64,3 +64,6 @@ #define TIMER_CLIENT_TIME 0x4 //Timer can be stopped using deltimer() #define TIMER_STOPPABLE 0x8 +//To be used with TIMER_UNIQUE +//prevents distinguishing identical timers with the wait variable +#define TIMER_NO_HASH_WAIT 0x10 \ No newline at end of file diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 94bb8d497b2..56001538915 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -298,7 +298,11 @@ proc/addtimer(datum/callback/callback, wait, flags) var/hash if (flags & TIMER_UNIQUE) - var/list/hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME) + var/list/hashlist + if(flags & TIMER_NO_HASH_WAIT) + hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags & TIMER_CLIENT_TIME) + else + hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME) hashlist += callback.arguments hash = hashlist.Join("|||||||")