mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +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:
@@ -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