Welding Tool Surgery Fuel Usage Fix (#19597)

* Fixed welding tools using fuel in prosthetic repairs during the check
to see if it CAN do the surgery. Instead, the fuel when be consumed once
the surgery completes.

I _think_ this fixes the issue where welding fuel usage for prosthetic
surgery is bonkers, but I wasn't able to reproduce the bug on my local,
so keep an eye out for it still.
This commit is contained in:
Geeves
2024-07-09 15:41:43 +00:00
committed by GitHub
parent e6917d84e5
commit dc80fc1ea3
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -201,7 +201,7 @@
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(tool.iswelder())
var/obj/item/weldingtool/welder = tool
if(!welder.isOn() || !welder.use(2,user))
if(!welder.isOn() || welder.get_fuel() < 2)
return FALSE
return affected && affected.open == ORGAN_ENCASED_RETRACTED && affected.brute_dam > 0 && target_zone != BP_MOUTH
@@ -214,7 +214,7 @@
/singleton/surgery_step/robotics/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if(tool.iswelder())
var/obj/item/weldingtool/welder = tool
if(!welder.isOn())
if(!welder.isOn() && !welder.use(2, user))
user.visible_message(SPAN_WARNING("[user]'s [tool] shut off before the procedure was finished."), \
SPAN_WARNING("Your [tool] is shut off!"))
return