From 068089fb52bf13db6fd410987d24d8677959d586 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 20 Jun 2023 18:39:49 +0200 Subject: [PATCH] [MIRROR] Standardize Welder Fuel Usage [MDB IGNORE] (#21943) * Standardize Welder Fuel Usage (#76021) Remove welder fuel usage from all actions except attacking and leaving it on most welder tasks require a minimum of 1u of fuel, some longer tasks require a minimum of 2 or 3u welders now drain 1u every 5 seconds they're active ## About The Pull Request Prior to this PR welder fuel usage was random, a lot of tasks didn't use any welder fuel and welders were basically near infinite so long as you didn't use them for combat, it took 26 seconds of activity to drain 1u of fuel, that means an emergency welder alone could run for 5 minutes straight before needing a refuel After this PR all welders will drain 1u every 5 seconds instead of every 26 seconds, but welding objects won't require extra fuel anymore, making the fuel usage much more consistent. resolves #55018 ## Why It's Good For The Game Actually makes fuel tanks useful and relevant without making it obnoxious to do repetitive quick tasks like turn rods into plates, there's actually a reason to upgrade off the emergency welder now since it lasts 50 seconds rather than 5 minutes ## Changelog :cl: qol: Welders now have a more consistent fuel usage /:cl: * Standardize Welder Fuel Usage --------- Co-authored-by: Couls --- code/datums/elements/rust.dm | 2 +- code/game/machinery/PDApainter.dm | 2 +- code/game/machinery/camera/camera.dm | 2 +- code/game/machinery/camera/camera_assembly.dm | 4 ++-- code/game/machinery/computer/buildandrepair.dm | 2 +- code/game/machinery/deployable.dm | 2 +- code/game/machinery/doors/airlock.dm | 8 ++++---- code/game/machinery/doors/firedoor.dm | 4 ++-- code/game/machinery/droneDispenser.dm | 2 +- code/game/machinery/firealarm.dm | 2 +- code/game/machinery/newscaster/newscaster_machine.dm | 2 +- code/game/machinery/syndicatebomb.dm | 4 ++-- code/game/objects/items/tools/weldingtool.dm | 4 ++-- code/game/objects/structures/ai_core.dm | 2 +- code/game/objects/structures/crates_lockers/closets.dm | 4 ++-- code/game/objects/structures/displaycase.dm | 4 ++-- code/game/objects/structures/door_assembly.dm | 2 +- code/game/objects/structures/girders.dm | 2 +- code/game/objects/structures/mirror.dm | 2 +- code/game/objects/structures/plaques/_plaques.dm | 4 ++-- code/game/objects/structures/railings.dm | 2 +- code/game/objects/structures/reflector.dm | 2 +- code/game/objects/structures/signs/_signs.dm | 4 ++-- code/game/objects/structures/windoor_assembly.dm | 2 +- code/game/shuttle_engines.dm | 4 ++-- code/game/turfs/closed/wall/reinf_walls.dm | 6 +++--- code/game/turfs/closed/walls.dm | 4 ++-- code/game/turfs/open/floor/plating.dm | 4 ++-- .../nukeop/equipment/nuclear_bomb/_nuclear_bomb.dm | 2 +- code/modules/art/statues.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- .../machinery/components/fusion/hfr_parts.dm | 2 +- .../machinery/components/unary_devices/vent_pump.dm | 2 +- .../components/unary_devices/vent_scrubber.dm | 2 +- .../atmospherics/machinery/portable/canister.dm | 4 ++-- code/modules/clothing/glasses/_glasses.dm | 2 +- code/modules/food_and_drinks/machinery/smartfridge.dm | 10 +++++----- code/modules/industrial_lift/tram/tram_walls.dm | 2 +- code/modules/mining/ores_coins.dm | 2 +- .../modular_computers/computers/item/computer.dm | 2 +- code/modules/plumbing/plumbers/_plumb_machinery.dm | 2 +- code/modules/power/apc/apc_tool_act.dm | 6 +++--- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/singularity/emitter.dm | 4 ++-- code/modules/power/singularity/field_generator.dm | 4 ++-- code/modules/recycling/disposal/bin.dm | 2 +- code/modules/recycling/disposal/construction.dm | 2 +- code/modules/recycling/disposal/outlet.dm | 2 +- code/modules/recycling/disposal/pipe.dm | 2 +- code/modules/vehicles/atv.dm | 2 +- code/modules/vehicles/bicycle.dm | 2 +- code/modules/vehicles/cars/vim.dm | 2 +- code/modules/vehicles/mecha/mecha_defense.dm | 2 +- code/modules/vehicles/secway.dm | 2 +- 54 files changed, 79 insertions(+), 79 deletions(-) diff --git a/code/datums/elements/rust.dm b/code/datums/elements/rust.dm index 5f5ee0b26e8..f34182384ce 100644 --- a/code/datums/elements/rust.dm +++ b/code/datums/elements/rust.dm @@ -51,7 +51,7 @@ /datum/element/rust/proc/handle_tool_use(atom/source, mob/user, obj/item/item) switch(item.tool_behaviour) if(TOOL_WELDER) - if(!item.tool_start_check(user, amount=5)) + if(!item.tool_start_check(user, amount=1)) return user.balloon_alert(user, "burning off rust...") diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index cce8697c0c8..f6b9dad763e 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -110,7 +110,7 @@ /obj/machinery/pdapainter/attackby(obj/item/O, mob/living/user, params) if(machine_stat & BROKEN) if(O.tool_behaviour == TOOL_WELDER && !user.combat_mode) - if(!O.tool_start_check(user, amount=0)) + if(!O.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user] is repairing [src]."), \ span_notice("You begin repairing [src]..."), \ diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index dcf889ee342..2c12acf2d99 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -285,7 +285,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0) if(!panel_open) return - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=2)) return TRUE to_chat(user, span_notice("You start to weld [src]...")) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 69732938de3..0156c06a142 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -125,11 +125,11 @@ if(state != STATE_WRENCHED && state != STATE_WELDED) return . = TRUE - if(!tool.tool_start_check(user, amount=3)) + if(!tool.tool_start_check(user, amount=1)) return user.balloon_alert_to_viewers("[state == STATE_WELDED ? "un" : null]welding...") audible_message(span_hear("You hear welding.")) - if(!tool.use_tool(src, user, 2 SECONDS, amount=3, volume = 50)) + if(!tool.use_tool(src, user, 2 SECONDS, volume = 50)) user.balloon_alert_to_viewers("stopped [state == STATE_WELDED ? "un" : null]welding!") return state = ((state == STATE_WELDED) ? STATE_WRENCHED : STATE_WELDED) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 3d730535c3a..7bca8b37ac0 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -20,7 +20,7 @@ state = 1 return if(P.tool_behaviour == TOOL_WELDER) - if(!P.tool_start_check(user, amount=0)) + if(!P.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You start deconstructing the frame...")) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index e3937e7c6b8..94db4f2614c 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -28,7 +28,7 @@ /obj/structure/barricade/attackby(obj/item/I, mob/living/user, params) if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode && bar_material == METAL) if(atom_integrity < max_integrity) - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You begin repairing [src]...")) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index d9e7c1a8e2d..b67be3847eb 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -864,12 +864,12 @@ else return TOOL_ACT_TOOLTYPE_SUCCESS - if(!tool.tool_start_check(user, amount=2)) + if(!tool.tool_start_check(user, amount=1)) return TOOL_ACT_TOOLTYPE_SUCCESS to_chat(user, span_notice("You begin cutting the [layer_flavor]...")) - if(!tool.use_tool(src, user, 4 SECONDS, volume=50, amount=2)) + if(!tool.use_tool(src, user, 4 SECONDS, volume=50)) return TOOL_ACT_TOOLTYPE_SUCCESS if(!panel_open || security_level != starting_level) @@ -981,7 +981,7 @@ return if(atom_integrity < max_integrity) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user] begins welding the airlock."), \ span_notice("You begin repairing the airlock..."), \ @@ -996,7 +996,7 @@ to_chat(user, span_notice("The airlock doesn't need repairing.")) /obj/machinery/door/airlock/try_to_weld_secondary(obj/item/weldingtool/tool, mob/user) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user] begins [welded ? "unwelding":"welding"] the airlock."), \ span_notice("You begin [welded ? "unwelding":"welding"] the airlock..."), \ diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 952fa835f32..c74d613ec0d 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -516,7 +516,7 @@ return /obj/machinery/door/firedoor/try_to_weld_secondary(obj/item/weldingtool/W, mob/user) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user] starts [welded ? "unwelding" : "welding"] [src]."), span_notice("You start welding [src].")) if(W.use_tool(src, user, DEFAULT_STEP_TIME, volume=50)) @@ -857,7 +857,7 @@ user.visible_message(span_notice("[user] begins cutting apart [src]'s frame..."), \ span_notice("You begin slicing [src] apart...")) - if(attacking_object.use_tool(src, user, DEFAULT_STEP_TIME, volume=50, amount=1)) + if(attacking_object.use_tool(src, user, DEFAULT_STEP_TIME, volume=50)) if(constructionStep != CONSTRUCTION_NO_CIRCUIT) return user.visible_message(span_notice("[user] cuts apart [src]!"), \ diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/droneDispenser.dm index 6741927204b..20e8fd832ae 100644 --- a/code/game/machinery/droneDispenser.dm +++ b/code/game/machinery/droneDispenser.dm @@ -229,7 +229,7 @@ span_notice("[user] begins patching up [src] with [I]."), span_notice("You begin restoring the damage to [src]...")) - if(!I.use_tool(src, user, 40, volume=50, amount=1)) + if(!I.use_tool(src, user, 40, volume=50)) return user.visible_message( diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index a9d7850c216..26ea0612c7d 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -327,7 +327,7 @@ if(tool.tool_behaviour == TOOL_WELDER && !user.combat_mode) if(atom_integrity < max_integrity) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You begin repairing [src]...")) diff --git a/code/game/machinery/newscaster/newscaster_machine.dm b/code/game/machinery/newscaster/newscaster_machine.dm index 545b5c719f6..c5c82d69c3c 100644 --- a/code/game/machinery/newscaster/newscaster_machine.dm +++ b/code/game/machinery/newscaster/newscaster_machine.dm @@ -494,7 +494,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) if(!(machine_stat & BROKEN)) to_chat(user, span_notice("[src] does not need repairs.")) return - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return user.balloon_alert_to_viewers("started welding...", "started repairing...") audible_message(span_hear("You hear welding.")) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index ce3d1abe11b..d1a702df2d9 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -183,11 +183,11 @@ if(payload || !wires.is_all_cut() || !open_panel) return FALSE - if(!tool.tool_start_check(user, amount=5)) //uses up 5 fuel + if(!tool.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("You start to cut [src] apart...")) - if(tool.use_tool(src, user, 20, volume=50, amount=5)) // uses up 5 fuel + if(tool.use_tool(src, user, 20, volume=50)) to_chat(user, span_notice("You cut [src] apart.")) new /obj/item/stack/sheet/plasteel(loc, 5) qdel(src) diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index d936d6deba3..2251218d78d 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -1,5 +1,5 @@ /// How many seconds between each fuel depletion tick ("use" proc) -#define WELDER_FUEL_BURN_INTERVAL 26 +#define WELDER_FUEL_BURN_INTERVAL 5 /obj/item/weldingtool name = "welding tool" desc = "A standard edition welder provided by Nanotrasen." @@ -331,7 +331,7 @@ to_chat(user, span_warning("You need one rod to start building a flamethrower!")) /obj/item/weldingtool/ignition_effect(atom/ignitable_atom, mob/user) - if(use_tool(ignitable_atom, user, 0, amount=1)) + if(use_tool(ignitable_atom, user, 0)) return span_notice("[user] casually lights [ignitable_atom] with [src], what a badass.") else return "" diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index d0d1e5dc9db..4ed67e3b3c6 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -163,7 +163,7 @@ balloon_alert(user, "core must be empty to deconstruct it!") return - if(!P.tool_start_check(user, amount=0)) + if(!P.tool_start_check(user, amount=1)) return balloon_alert(user, "deconstructing frame...") diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index d943aded0ac..ed331390a13 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -787,7 +787,7 @@ else if(opened) if(istype(weapon, cutting_tool)) if(weapon.tool_behaviour == TOOL_WELDER) - if(!weapon.tool_start_check(user, amount=0)) + if(!weapon.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You begin cutting \the [src] apart...")) @@ -810,7 +810,7 @@ return else if(weapon.tool_behaviour == TOOL_WELDER && can_weld_shut) - if(!weapon.tool_start_check(user, amount=0)) + if(!weapon.tool_start_check(user, amount=1)) return if(weapon.use_tool(src, user, 40, volume=50)) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 7146c04723e..b9a3973527d 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -138,11 +138,11 @@ to_chat(user, span_alert("Access denied.")) else if(tool.tool_behaviour == TOOL_WELDER && !user.combat_mode && !broken) if(atom_integrity < max_integrity) - if(!tool.tool_start_check(user, amount=5)) + if(!tool.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You begin repairing [src]...")) - if(tool.use_tool(src, user, 40, amount=5, volume=50)) + if(tool.use_tool(src, user, 40, volume=50)) atom_integrity = max_integrity update_appearance() to_chat(user, span_notice("You repair [src].")) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 8ef22fc984e..9cf5d622667 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -60,7 +60,7 @@ created_name = t else if((W.tool_behaviour == TOOL_WELDER) && (mineral || glass || !anchored )) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return if(mineral) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index a6243593165..433a4b2e343 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -406,7 +406,7 @@ /obj/structure/girder/cult/attackby(obj/item/W, mob/user, params) add_fingerprint(user) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return balloon_alert(user, "slicing apart...") diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 73c0c02c2c3..56a8c84119c 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -110,7 +110,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) if(!broken) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE balloon_alert(user, "repairing...") diff --git a/code/game/objects/structures/plaques/_plaques.dm b/code/game/objects/structures/plaques/_plaques.dm index 775c7efef82..8b8047ba464 100644 --- a/code/game/objects/structures/plaques/_plaques.dm +++ b/code/game/objects/structures/plaques/_plaques.dm @@ -69,7 +69,7 @@ if(atom_integrity == max_integrity) to_chat(user, span_warning("This plaque is already in perfect condition.")) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user] starts repairing [src]..."), \ span_notice("You start repairing [src].")) @@ -141,7 +141,7 @@ if(atom_integrity == max_integrity) to_chat(user, span_warning("This plaque is already in perfect condition.")) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user] starts repairing [src]..."), \ span_notice("You start repairing [src].")) diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm index 96fd0ac2356..e6fee2d3986 100644 --- a/code/game/objects/structures/railings.dm +++ b/code/game/objects/structures/railings.dm @@ -48,7 +48,7 @@ if(I.tool_behaviour == TOOL_WELDER && !user.combat_mode) if(atom_integrity < max_integrity) - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You begin repairing [src]...")) diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 6ec3f930884..57b5ff1c492 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -105,7 +105,7 @@ return TOOL_ACT_TOOLTYPE_SUCCESS /obj/structure/reflector/welder_act(mob/living/user, obj/item/tool) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return if(atom_integrity < max_integrity) user.visible_message(span_notice("[user] starts to repair [src]."), diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm index e3ee70dfec7..cdb7ba0811f 100644 --- a/code/game/objects/structures/signs/_signs.dm +++ b/code/game/objects/structures/signs/_signs.dm @@ -76,7 +76,7 @@ if(atom_integrity == max_integrity) to_chat(user, span_warning("This sign is already in perfect condition.")) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user] starts repairing [src]..."), \ span_notice("You start repairing [src].")) @@ -220,7 +220,7 @@ if(atom_integrity == max_integrity) to_chat(user, span_warning("This sign is already in perfect condition.")) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user] starts repairing [src]..."), \ span_notice("You start repairing [src].")) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index ae705bdf892..b4498699bf7 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -98,7 +98,7 @@ switch(state) if("01") if(W.tool_behaviour == TOOL_WELDER && !anchored) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user] disassembles the windoor assembly."), diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index a4eb334549b..7a474d6fa1d 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -88,7 +88,7 @@ if(ENGINE_UNWRENCHED) to_chat(user, span_warning("The [src.name] needs to be wrenched to the floor!")) if(ENGINE_WRENCHED) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5))) return TRUE user.visible_message(span_notice("[user.name] starts to weld the [name] to the floor."), \ @@ -101,7 +101,7 @@ alter_engine_power(engine_power) if(ENGINE_WELDED) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=round(ENGINE_WELDTIME / 5))) return TRUE user.visible_message(span_notice("[user.name] starts to cut the [name] free from the floor."), \ diff --git a/code/game/turfs/closed/wall/reinf_walls.dm b/code/game/turfs/closed/wall/reinf_walls.dm index 5168f337483..23641d09262 100644 --- a/code/game/turfs/closed/wall/reinf_walls.dm +++ b/code/game/turfs/closed/wall/reinf_walls.dm @@ -74,7 +74,7 @@ if(COVER) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=2)) return to_chat(user, span_notice("You begin slicing through the metal cover...")) if(W.use_tool(src, user, 60, volume=100)) @@ -107,7 +107,7 @@ return TRUE if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=2)) return to_chat(user, span_notice("You begin welding the metal cover back to the frame...")) if(W.use_tool(src, user, 60, volume=100)) @@ -141,7 +141,7 @@ if(SUPPORT_RODS) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=2)) return to_chat(user, span_notice("You begin slicing through the support rods...")) if(W.use_tool(src, user, 100, volume=100)) diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm index 11427d8f161..676edea50da 100644 --- a/code/game/turfs/closed/walls.dm +++ b/code/game/turfs/closed/walls.dm @@ -202,7 +202,7 @@ return FALSE if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return FALSE to_chat(user, span_notice("You begin fixing dents on the wall...")) @@ -231,7 +231,7 @@ /turf/closed/wall/proc/try_decon(obj/item/I, mob/user) if(I.tool_behaviour == TOOL_WELDER) - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=round(slicing_duration / 50))) return FALSE to_chat(user, span_notice("You begin slicing through the outer plating...")) diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm index 7a2ca30a0b1..1ff83fec0c3 100644 --- a/code/game/turfs/open/floor/plating.dm +++ b/code/game/turfs/open/floor/plating.dm @@ -252,7 +252,7 @@ if(PLATE_BOLTS_LOOSENED) switch(tool_used.tool_behaviour) if(TOOL_WELDER) - if(!tool_used.tool_start_check(user, amount=0)) + if(!tool_used.tool_start_check(user, amount=3)) return balloon_alert(user, "slicing...") if(tool_used.use_tool(src, user, 15 SECONDS, volume=100)) @@ -287,7 +287,7 @@ return TRUE if(TOOL_WELDER) - if(!tool_used.tool_start_check(user, amount=0)) + if(!tool_used.tool_start_check(user, amount=3)) return balloon_alert(user, "welding back on...") if(tool_used.use_tool(src, user, 15 SECONDS, volume=100)) diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_bomb/_nuclear_bomb.dm b/code/modules/antagonists/nukeop/equipment/nuclear_bomb/_nuclear_bomb.dm index ef29262bc7a..0786f248886 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclear_bomb/_nuclear_bomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclear_bomb/_nuclear_bomb.dm @@ -116,7 +116,7 @@ GLOBAL_VAR(station_nuke_source) if(!weapon.tool_start_check(user, amount = 1)) return TRUE to_chat(user, span_notice("You start cutting [src]'s inner plate...")) - if(weapon.use_tool(src, user, 8 SECONDS, volume=100, amount=1)) + if(weapon.use_tool(src, user, 8 SECONDS, volume=100)) to_chat(user, span_notice("You cut [src]'s inner plate.")) deconstruction_state = NUKESTATE_WELDED update_appearance() diff --git a/code/modules/art/statues.dm b/code/modules/art/statues.dm index 31fe7aefb4b..68986a3259c 100644 --- a/code/modules/art/statues.dm +++ b/code/modules/art/statues.dm @@ -38,7 +38,7 @@ add_fingerprint(user) if(!(flags_1 & NODECONSTRUCT_1)) if(W.tool_behaviour == TOOL_WELDER) - if(!W.tool_start_check(user, amount=0)) + if(!W.tool_start_check(user, amount=1)) return FALSE user.balloon_alert(user, "slicing apart...") if(W.use_tool(src, user, 40, volume=50)) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 0153c121d45..3fefbc3c17d 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -59,7 +59,7 @@ if(status) to_chat(user, span_warning("[bombtank] already has a pressure hole!")) return - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return if(I.use_tool(src, user, 0, volume=40)) status = TRUE diff --git a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm index e08260a8aca..7ec4760d54d 100644 --- a/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm +++ b/code/modules/atmospherics/machinery/components/fusion/hfr_parts.dm @@ -50,7 +50,7 @@ if(user.combat_mode) return FALSE balloon_alert(user, "repairing...") - if(tool.use_tool(src, user, 10 SECONDS, volume=30, amount=5)) + if(tool.use_tool(src, user, 10 SECONDS, volume=30)) balloon_alert(user, "repaired") cracked = FALSE update_appearance() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 067cad67d9e..30c8ca704d9 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -212,7 +212,7 @@ /obj/machinery/atmospherics/components/unary/vent_pump/welder_act(mob/living/user, obj/item/welder) ..() - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("You begin welding the vent...")) if(welder.use_tool(src, user, 20, volume=50)) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index a937042b493..7e9951214c9 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -304,7 +304,7 @@ /obj/machinery/atmospherics/components/unary/vent_scrubber/welder_act(mob/living/user, obj/item/welder) ..() - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("Now welding the scrubber.")) if(welder.use_tool(src, user, 20, volume=50)) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index c3c404ec9b2..4263dfe4836 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -476,7 +476,7 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister()) /obj/machinery/portable_atmospherics/canister/welder_act_secondary(mob/living/user, obj/item/I) . = ..() - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE var/pressure = air_contents.return_pressure() if(pressure > 300) @@ -497,7 +497,7 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister()) return TRUE if(machine_stat & BROKEN) return TRUE - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("You begin repairing cracks in [src]...")) while(tool.use_tool(src, user, 2.5 SECONDS, volume=40)) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 2acfc96316e..b52f8f7304c 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -306,7 +306,7 @@ return if(!I.tool_start_check(user, amount=1)) return - if(I.use_tool(src, user, 10, volume=30, amount=1)) + if(I.use_tool(src, user, 10, volume=30)) user.visible_message(span_notice("[user] welds [src] back together."),\ span_notice("You weld [src] back together.")) repair() diff --git a/code/modules/food_and_drinks/machinery/smartfridge.dm b/code/modules/food_and_drinks/machinery/smartfridge.dm index a7bc7a57c62..db6ed91f8ab 100644 --- a/code/modules/food_and_drinks/machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/machinery/smartfridge.dm @@ -67,14 +67,14 @@ if(istype(src, /obj/machinery/smartfridge/drying_rack)) return FALSE if(welded_down) - if(!tool.tool_start_check(user, amount=1)) + if(!tool.tool_start_check(user, amount=2)) return TRUE user.visible_message( span_notice("[user.name] starts to cut the [name] free from the floor."), span_notice("You start to cut [src] free from the floor..."), span_hear("You hear welding."), ) - if(!tool.use_tool(src, user, delay=100, amount=1, volume=100)) + if(!tool.use_tool(src, user, delay=100, volume=100)) return FALSE welded_down = FALSE to_chat(user, span_notice("You cut [src] free from the floor.")) @@ -82,14 +82,14 @@ if(!anchored) to_chat(user, span_warning("[src] needs to be wrenched to the floor!")) return TRUE - if(!tool.tool_start_check(user, amount=1)) + if(!tool.tool_start_check(user, amount=2)) return TRUE user.visible_message( span_notice("[user.name] starts to weld the [name] to the floor."), span_notice("You start to weld [src] to the floor..."), span_hear("You hear welding."), ) - if(!tool.use_tool(src, user, delay=100, amount=1, volume=100)) + if(!tool.use_tool(src, user, delay=100, volume=100)) balloon_alert(user, "cancelled!") return FALSE welded_down = TRUE @@ -101,7 +101,7 @@ if(istype(src, /obj/machinery/smartfridge/drying_rack)) return FALSE if(machine_stat & BROKEN) - if(!tool.tool_start_check(user, amount=0)) + if(!tool.tool_start_check(user, amount=1)) return FALSE user.visible_message( span_notice("[user] is repairing [src]."), diff --git a/code/modules/industrial_lift/tram/tram_walls.dm b/code/modules/industrial_lift/tram/tram_walls.dm index f52e75c23bb..c8bf7e970b5 100644 --- a/code/modules/industrial_lift/tram/tram_walls.dm +++ b/code/modules/industrial_lift/tram/tram_walls.dm @@ -35,7 +35,7 @@ /obj/structure/tramwall/attackby(obj/item/welder, mob/user, params) if(welder.tool_behaviour == TOOL_WELDER) - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=round(slicing_duration / 50))) return FALSE to_chat(user, span_notice("You begin slicing through the outer plating...")) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index a408108b95a..be63e3888c8 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -50,7 +50,7 @@ if(!refined_type) return TRUE - if(I.use_tool(src, user, 0, volume=50, amount=15)) + if(I.use_tool(src, user, 0, volume=50)) new refined_type(drop_location()) use(1) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 93556ecd132..70d54b9284b 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -788,7 +788,7 @@ GLOBAL_LIST_EMPTY(TabletMessengers) // a list of all active messengers, similar return TOOL_ACT_TOOLTYPE_SUCCESS to_chat(user, span_notice("You begin repairing damage to \the [src]...")) - if(!tool.use_tool(src, user, 20, volume=50, amount=1)) + if(!tool.use_tool(src, user, 20, volume=50)) return TOOL_ACT_TOOLTYPE_SUCCESS atom_integrity = max_integrity to_chat(user, span_notice("You repair \the [src].")) diff --git a/code/modules/plumbing/plumbers/_plumb_machinery.dm b/code/modules/plumbing/plumbers/_plumb_machinery.dm index bce4fcc1e3e..52b6ee97a39 100644 --- a/code/modules/plumbing/plumbers/_plumb_machinery.dm +++ b/code/modules/plumbing/plumbers/_plumb_machinery.dm @@ -47,7 +47,7 @@ . = ..() if(anchored) to_chat(user, span_warning("The [name] needs to be unbolted to do that!")) - if(I.tool_start_check(user, amount=0)) + if(I.tool_start_check(user, amount=1)) to_chat(user, span_notice("You start slicing the [name] apart.")) if(I.use_tool(src, user, (1.5 SECONDS), volume=50)) deconstruct(TRUE) diff --git a/code/modules/power/apc/apc_tool_act.dm b/code/modules/power/apc/apc_tool_act.dm index 1a645c4ebe2..76d714ed957 100644 --- a/code/modules/power/apc/apc_tool_act.dm +++ b/code/modules/power/apc/apc_tool_act.dm @@ -124,7 +124,7 @@ if (machine_stat & BROKEN) balloon_alert(user, "too damaged to repair!") return - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=1)) return balloon_alert(user, "repairing...") if(welder.use_tool(src, user, 4 SECONDS, volume = 50)) @@ -135,12 +135,12 @@ //disassembling the frame if(!opened || has_electronics || terminal) return - if(!welder.tool_start_check(user, amount=3)) + if(!welder.tool_start_check(user, amount=1)) return user.visible_message(span_notice("[user.name] welds [src]."), \ span_hear("You hear welding.")) balloon_alert(user, "welding the APC frame") - if(!welder.use_tool(src, user, 50, volume=50, amount=3)) + if(!welder.use_tool(src, user, 50, volume=50)) return if((machine_stat & BROKEN) || opened == APC_COVER_REMOVED) new /obj/item/stack/sheet/iron(loc) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index ddbc1a31f55..588bea85dd6 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -228,7 +228,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) return if(GRAV_NEEDS_WELDING) if(weapon.tool_behaviour == TOOL_WELDER) - if(weapon.use_tool(src, user, 0, volume=50, amount=1)) + if(weapon.use_tool(src, user, 0, volume=50)) to_chat(user, span_notice("You mend the damaged framework.")) broken_state++ update_appearance() diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index efc5542b1c1..ec0488fd83d 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -265,7 +265,7 @@ return TRUE if(welded) - if(!item.tool_start_check(user, amount=0)) + if(!item.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user.name] starts to cut the [name] free from the floor."), \ span_notice("You start to cut [src] free from the floor..."), \ @@ -281,7 +281,7 @@ if(!anchored) to_chat(user, span_warning("[src] needs to be wrenched to the floor!")) return TRUE - if(!item.tool_start_check(user, amount=0)) + if(!item.tool_start_check(user, amount=1)) return TRUE user.visible_message(span_notice("[user.name] starts to weld the [name] to the floor."), \ span_notice("You start to weld [src] to the floor..."), \ diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 6fe5370a9ae..88534d7e9b0 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -141,7 +141,7 @@ no power level overlay is currently in the overlays list. to_chat(user, span_warning("[src] needs to be wrenched to the floor!")) if(FG_SECURED) - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=1)) return TRUE user.visible_message( span_notice("[user] starts to weld [src] to the floor."), @@ -152,7 +152,7 @@ no power level overlay is currently in the overlays list. to_chat(user, span_notice("You weld the field generator to the floor.")) if(FG_WELDED) - if(!welder.tool_start_check(user, amount=0)) + if(!welder.tool_start_check(user, amount=1)) return TRUE user.visible_message( span_notice("[user] starts to cut [src] free from the floor."), diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index 8ba36404683..c241c3087f8 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -116,7 +116,7 @@ to_chat(user, span_notice("You [panel_open ? "remove":"attach"] the screws around the power connection.")) return else if(I.tool_behaviour == TOOL_WELDER && panel_open) - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return to_chat(user, span_notice("You start slicing the floorweld off \the [src]...")) diff --git a/code/modules/recycling/disposal/construction.dm b/code/modules/recycling/disposal/construction.dm index 440f1131443..f01e2ae1dea 100644 --- a/code/modules/recycling/disposal/construction.dm +++ b/code/modules/recycling/disposal/construction.dm @@ -154,7 +154,7 @@ to_chat(user, span_warning("A disposals machine already exists here!")) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("You start welding the [pipename] in place...")) diff --git a/code/modules/recycling/disposal/outlet.dm b/code/modules/recycling/disposal/outlet.dm index e37e9acb9a9..c63c347ec69 100644 --- a/code/modules/recycling/disposal/outlet.dm +++ b/code/modules/recycling/disposal/outlet.dm @@ -78,7 +78,7 @@ /obj/structure/disposaloutlet/welder_act(mob/living/user, obj/item/I) ..() - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE playsound(src, 'sound/items/welder2.ogg', 100, TRUE) diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index e35be284bad..7d756fe7d43 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -150,7 +150,7 @@ if(!can_be_deconstructed(user)) return TRUE - if(!I.tool_start_check(user, amount=0)) + if(!I.tool_start_check(user, amount=1)) return TRUE to_chat(user, span_notice("You start slicing [src]...")) diff --git a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm index bf923cd6c3c..c4fd2bcaceb 100644 --- a/code/modules/vehicles/atv.dm +++ b/code/modules/vehicles/atv.dm @@ -92,7 +92,7 @@ audible_message(span_hear("You hear welding.")) var/did_the_thing while(atom_integrity < max_integrity) - if(W.use_tool(src, user, 2.5 SECONDS, volume=50, amount=1)) + if(W.use_tool(src, user, 2.5 SECONDS, volume=50)) did_the_thing = TRUE atom_integrity += min(10, (max_integrity - atom_integrity)) audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/bicycle.dm b/code/modules/vehicles/bicycle.dm index 1771bb96133..cc0643be026 100644 --- a/code/modules/vehicles/bicycle.dm +++ b/code/modules/vehicles/bicycle.dm @@ -39,7 +39,7 @@ audible_message(span_hear("You hear welding.")) var/did_the_thing while(atom_integrity < max_integrity) - if(W.use_tool(src, user, 2.5 SECONDS, volume=50, amount=1, extra_checks = CALLBACK(src, PROC_REF(can_still_fix)))) + if(W.use_tool(src, user, 2.5 SECONDS, volume=50, extra_checks = CALLBACK(src, PROC_REF(can_still_fix)))) did_the_thing = TRUE atom_integrity += min(10, (max_integrity - atom_integrity)) audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/cars/vim.dm b/code/modules/vehicles/cars/vim.dm index 8079f7cc6b6..a37c6e18b8e 100644 --- a/code/modules/vehicles/cars/vim.dm +++ b/code/modules/vehicles/cars/vim.dm @@ -73,7 +73,7 @@ audible_message(span_hear("You hear welding.")) var/did_the_thing while(atom_integrity < max_integrity) - if(W.use_tool(src, user, 2.5 SECONDS, volume=50, amount=1)) + if(W.use_tool(src, user, 2.5 SECONDS, volume=50)) did_the_thing = TRUE atom_integrity += min(VIM_HEAL_AMOUNT, (max_integrity - atom_integrity)) audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm index 0747716ce49..d858e195cd0 100644 --- a/code/modules/vehicles/mecha/mecha_defense.dm +++ b/code/modules/vehicles/mecha/mecha_defense.dm @@ -355,7 +355,7 @@ audible_message(span_hear("You hear welding.")) var/did_the_thing while(atom_integrity < max_integrity) - if(W.use_tool(src, user, 2.5 SECONDS, volume=50, amount=1)) + if(W.use_tool(src, user, 2.5 SECONDS, volume=50)) did_the_thing = TRUE atom_integrity += min(10, (max_integrity - atom_integrity)) audible_message(span_hear("You hear welding.")) diff --git a/code/modules/vehicles/secway.dm b/code/modules/vehicles/secway.dm index 337c154d869..fb237393338 100644 --- a/code/modules/vehicles/secway.dm +++ b/code/modules/vehicles/secway.dm @@ -50,7 +50,7 @@ audible_message(span_hear("You hear welding.")) var/did_the_thing while(atom_integrity < max_integrity) - if(W.use_tool(src, user, 2.5 SECONDS, volume=50, amount=1)) + if(W.use_tool(src, user, 2.5 SECONDS, volume=50)) did_the_thing = TRUE atom_integrity += min(10, (max_integrity - atom_integrity)) audible_message(span_hear("You hear welding."))