You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Timed action involving one mob user. Target is optional, defaulting to user.
265
-
*
266
-
* Checks that `user` does not move, change hands, get stunned, etc. for the
267
-
* given `time`. Returns `TRUE` on success or `FALSE` on failure.
268
-
* Interaction_key is the assoc key under which the do_after is capped, with max_interact_count being the cap. Interaction key will default to target if not set.
269
-
*/
270
-
/proc/do_after(atom/movable/user,atom/target, time, timed_action_flags =NONE, progress =TRUE,datum/callback/extra_checks, interaction_key, max_interact_count =1,image/display)
271
-
if(!user)
272
-
returnFALSE
273
-
274
-
if(!target)
275
-
target = user
276
-
if(isnum(target))
277
-
CRASH("a do_after created by [user] had a target set as [target]- probably intended to be the time instead.")
278
-
if(isatom(time))
279
-
CRASH("a do_after created by [user] had a timer of [time]- probably intended to be the target instead.")
280
-
281
-
if(!interaction_key)
282
-
interaction_key = target //Use the direct ref to the target
283
-
if(interaction_key) //Do we have a interaction_key now?
///Timed action involving at least one mob user and a list of targets. interaction_key is the assoc key under which the do_after is capped under, and the max interaction count is how many of this interaction you can do at once.
352
-
/proc/do_after_mob(mob/user,list/targets, time =3SECONDS, timed_action_flags =NONE, progress =TRUE,datum/callback/extra_checks, interaction_key, max_interact_count =1)
353
-
if(!user)
354
-
returnFALSE
355
-
if(!islist(targets))
356
-
targets =list(targets)
357
-
if(!length(targets))
358
-
returnFALSE
359
-
var/user_loc= user.loc
360
-
361
-
if(!(timed_action_flags &IGNORE_SLOWDOWNS))
362
-
time *= user.cached_multiplicative_actions_slowdown
0 commit comments