Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+5 -11
View File
@@ -62,7 +62,7 @@ var/datum/subsystem/timer/SStimer
SStimer.hashes -= hash
return QDEL_HINT_IWILLGC
/proc/addtimer(thingToCall, procToCall, wait, unique = TIMER_NORMAL, ...)
/proc/addtimer(thingToCall, procToCall, wait, unique = FALSE, ...)
if (!thingToCall || !procToCall)
return
if (!SStimer.can_fire)
@@ -75,18 +75,12 @@ var/datum/subsystem/timer/SStimer
var/hashlist = args.Copy()
hashlist[1] = "[thingToCall](\ref[thingToCall])"
event.hash = jointext(hashlist, null)
var/bad_args = unique != TIMER_NORMAL && unique != TIMER_UNIQUE
if(args.len > 4 || bad_args)
if(bad_args)
stack_trace("Invalid arguments in call to addtimer! Attempt to call [thingToCall] proc [procToCall]")
event.argList = args.Copy(4)
else
event.argList = args.Copy(5)
event.hash = jointext(args, null)
if(args.len > 4)
event.argList = args.Copy(5)
// Check for dupes if unique = 1.
if(!bad_args && unique != TIMER_NORMAL) //faster than checking if(unique == TIMER_UNIQUE)
if(unique)
var/datum/timedevent/hash_event = SStimer.hashes[event.hash]
if(hash_event)
return hash_event.id