Add lints for "new" override prevention feature (#49672)

* Add lints for "new" override prevention feature

* bEsPoKe

* i'm an idiot

* arg index
This commit is contained in:
Emmett Gaines
2020-03-05 10:22:19 -05:00
committed by GitHub
parent 5622112514
commit 33458640dc
10 changed files with 53 additions and 41 deletions
+8 -3
View File
@@ -816,7 +816,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
// Called before use_tool if there is a delay, or by use_tool if there isn't.
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
return tool_use_check(user, amount)
. = tool_use_check(user, amount)
if(.)
SEND_SIGNAL(src, COMSIG_TOOL_START_USE, user)
// A check called by tool_start_check once, and by use_tool on every tick of delay.
/obj/item/proc/tool_use_check(mob/living/user, amount)
@@ -837,9 +839,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
playsound(target, played_sound, volume, TRUE)
// Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.
/// Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.
/obj/item/proc/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
SHOULD_NOT_OVERRIDE(TRUE)
. = tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
if(.)
SEND_SIGNAL(src, COMSIG_TOOL_IN_USE, user)
// Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped
/obj/item/proc/get_part_rating()