mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Adds support for multiple callback checks for the do_after and incapacitated procs (#13057)
* do_after refactor Update slime.dm fix a comment if you read this you get a cookie! * some little tweaks Changes a TRUE to FALSE in a comment, got confused there. Removes the code that checks for non-callbacks in the extra_checks list and removes them. It should be up to the dev to not add non-callbacks to this list. I'd rather have it runtime instead * check_for_true_callbacks * CRLF to LF Co-authored-by: SteelSlayer <SteelSlayer@users.noreply.github.com>
This commit is contained in:
co-authored by
SteelSlayer
parent
bdafa40b40
commit
63ea21b20e
@@ -16,11 +16,11 @@
|
||||
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
|
||||
if(!do_after(user, delay, target=target, extra_checks=tool_check))
|
||||
if(!do_after(user, delay, target=target, extra_checks = list(tool_check)))
|
||||
return
|
||||
else
|
||||
// Invoke the extra checks once, just in case.
|
||||
|
||||
Reference in New Issue
Block a user