Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
This commit is contained in:
SteelSlayer
2020-03-24 12:19:48 -06:00
committed by GitHub
co-authored by SteelSlayer
parent ebded4f39e
commit 23490a52bf
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -316,7 +316,7 @@ This is always put in the attack log.
msg_admin_attack("[key_name_admin(user)] vs [key_name_admin(target)]: [what_done]", loglevel)
/proc/do_mob(var/mob/user, var/mob/target, var/time = 30, var/uninterruptible = 0, progress = 1, datum/callback/extra_checks = null)
/proc/do_mob(mob/user, mob/target, time = 30, uninterruptible = 0, progress = 1, list/extra_checks = list())
if(!user || !target)
return 0
var/user_loc = user.loc
@@ -349,7 +349,7 @@ This is always put in the attack log.
drifting = 0
user_loc = user.loc
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke()))
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying || check_for_true_callbacks(extra_checks))
. = 0
break
if(progress)
@@ -16,7 +16,7 @@
var/datum/callback/tool_check = CALLBACK(src, .proc/tool_check_callback, user, target, amount, extra_checks)
if(ismob(target))
if(!do_mob(user, target, delay, extra_checks = tool_check))
if(!do_mob(user, target, delay, extra_checks = list(tool_check)))
return
else