mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
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 🆑 qol: Welders now have a more consistent fuel usage /🆑
This commit is contained in:
@@ -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...")
|
||||
|
||||
@@ -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]..."), \
|
||||
|
||||
@@ -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]..."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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..."))
|
||||
|
||||
@@ -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]..."))
|
||||
|
||||
@@ -939,12 +939,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)
|
||||
@@ -1056,7 +1056,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..."), \
|
||||
@@ -1071,7 +1071,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..."), \
|
||||
|
||||
@@ -518,7 +518,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))
|
||||
@@ -859,7 +859,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]!"), \
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -317,7 +317,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]..."))
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."
|
||||
@@ -325,7 +325,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 ""
|
||||
|
||||
@@ -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...")
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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]."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -407,7 +407,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...")
|
||||
|
||||
@@ -108,7 +108,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...")
|
||||
|
||||
@@ -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]."))
|
||||
|
||||
@@ -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]..."))
|
||||
|
||||
@@ -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]."),
|
||||
|
||||
@@ -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]."))
|
||||
|
||||
@@ -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."),
|
||||
|
||||
@@ -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."), \
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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..."))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -298,7 +298,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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -305,7 +305,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()
|
||||
|
||||
@@ -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]."),
|
||||
|
||||
@@ -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..."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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]."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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..."), \
|
||||
|
||||
@@ -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."),
|
||||
|
||||
@@ -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]..."))
|
||||
|
||||
@@ -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..."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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]..."))
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -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."))
|
||||
|
||||
@@ -357,7 +357,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."))
|
||||
|
||||
@@ -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."))
|
||||
|
||||
Reference in New Issue
Block a user