Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blowtorch #7407

Merged
merged 6 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/game/machinery/autolathe_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

/datum/autolathe/recipe/weldertool
name = "blowtorch"
path = /obj/item/tool/weldingtool
path = /obj/item/tool/weldingtool/empty
category = AUTOLATHE_CATEGORY_TOOLS

/datum/autolathe/recipe/screwdriver
Expand Down
10 changes: 9 additions & 1 deletion code/game/objects/items/tools/maintenance_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
*/
/obj/item/tool/weldingtool
name = "blowtorch"
desc = "A blowtorch for welding and cutting metals."
icon = 'icons/obj/items/items.dmi'
icon_state = "welder"
pickup_sound = 'sound/handling/weldingtool_pickup.ogg'
Expand Down Expand Up @@ -188,6 +189,8 @@
var/welding = 0
/// The max amount of fuel the welder can hold
var/max_fuel = 40
/// Adding this line of code to determine whether a welder should have fuel when created or not.
var/starting_fuel = TRUE
/// Used to slowly deplete the fuel when the tool is left on.
var/weld_tick = 0
var/has_welding_screen = FALSE
Expand All @@ -196,7 +199,9 @@
/obj/item/tool/weldingtool/Initialize()
. = ..()
create_reagents(max_fuel)
reagents.add_reagent("fuel", max_fuel)
if (starting_fuel)
reagents.add_reagent("fuel", max_fuel)

base_icon_state = initial(icon_state)
return

Expand Down Expand Up @@ -417,6 +422,9 @@
to_chat(H, SPAN_WARNING("Your eyes are really starting to hurt. This can't be good for you!"))
return FALSE

/obj/item/tool/weldingtool/empty
starting_fuel = FALSE

/obj/item/tool/weldingtool/largetank
name = "industrial blowtorch"
max_fuel = 60
Expand Down
Loading