mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/progress_flash_divisor = 10
|
||||
var/burned_fuel_for = 0 //when fuel was last removed
|
||||
heat = 3800
|
||||
tool_behaviour = TOOL_WELDER
|
||||
@@ -45,6 +44,7 @@
|
||||
/obj/item/weldingtool/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
AddElement(/datum/element/tool_flash, light_intensity)
|
||||
|
||||
/obj/item/weldingtool/update_icon_state()
|
||||
if(welding)
|
||||
@@ -245,22 +245,6 @@
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
|
||||
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user && get_dist(get_turf(src), get_turf(user)) <= 1)
|
||||
user.flash_act(light_intensity)
|
||||
|
||||
// Flash the user during welding progress
|
||||
/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
. = ..()
|
||||
if(. && user && get_dist(get_turf(src), get_turf(user)) <= 1)
|
||||
if (progress_flash_divisor == 0)
|
||||
user.flash_act(min(light_intensity,1))
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
else
|
||||
progress_flash_divisor--
|
||||
|
||||
// If welding tool ran out of fuel during a construction task, construction fails.
|
||||
/obj/item/weldingtool/tool_use_check(mob/living/user, amount)
|
||||
if(!isOn() || !check_fuel())
|
||||
|
||||
Reference in New Issue
Block a user