mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +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:
@@ -133,14 +133,13 @@
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 0.7 //plasmacutters can be used as welders, and are faster than standard welders
|
||||
var/progress_flash_divisor = 10 //copypasta is best pasta
|
||||
var/light_intensity = 1
|
||||
var/charge_weld = 25 //amount of charge used up to start action (multiplied by amount) and per progress_flash_divisor ticks of welding
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 25, 105, 0, 'sound/weapons/plasma_cutter.ogg')
|
||||
AddElement(/datum/element/update_icon_blocker)
|
||||
AddElement(/datum/element/tool_flash, 1)
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -163,13 +162,6 @@
|
||||
else
|
||||
..()
|
||||
|
||||
// Tool procs, in case plasma cutter is used as welder
|
||||
// Can we start welding?
|
||||
/obj/item/gun/energy/plasmacutter/tool_start_check(mob/living/user, amount)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user)
|
||||
user.flash_act(light_intensity)
|
||||
|
||||
// Can we weld? Plasma cutter does not use charge continuously.
|
||||
// Amount cannot be defaulted to 1: most of the code specifies 0 in the call.
|
||||
/obj/item/gun/energy/plasmacutter/tool_use_check(mob/living/user, amount)
|
||||
@@ -188,17 +180,6 @@
|
||||
/obj/item/gun/energy/plasmacutter/use(amount)
|
||||
return (!QDELETED(cell) && cell.use(amount ? amount * charge_weld : charge_weld))
|
||||
|
||||
// This only gets called by use_tool(delay > 0)
|
||||
// It's also supposed to not get overridden in the first place.
|
||||
/obj/item/gun/energy/plasmacutter/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
. = ..() //return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
|
||||
if(. && user)
|
||||
if (progress_flash_divisor == 0)
|
||||
user.flash_act(min(light_intensity,1))
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
else
|
||||
progress_flash_divisor--
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/use_tool(atom/target, mob/living/user, delay, amount=1, volume=0, datum/callback/extra_checks)
|
||||
if(amount)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user