mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
do_after() now does its checks every tick, thus preventing people from fucking off for the duration, and coming back just before it finishes.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2770 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1253,12 +1253,14 @@ proc/listclearnulls(list/list)
|
||||
/proc/do_after(mob/M as mob, time as num)
|
||||
var/turf/T = M.loc
|
||||
var/holding = M.equipped()
|
||||
sleep(time)
|
||||
if(M)
|
||||
if ((M.loc == T && M.equipped() == holding && !( M.stat )))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
for(var/i=0, i<time)
|
||||
if(M)
|
||||
if ((M.loc == T && M.equipped() == holding && !( M.stat )))
|
||||
i++
|
||||
sleep(1)
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/proc/hasvar(var/datum/A, var/varname)
|
||||
//Takes: Anything that could possibly have variables and a varname to check.
|
||||
|
||||
Reference in New Issue
Block a user