From 197bedb2eba4a2a3f8aa320a0e27eea433c37780 Mon Sep 17 00:00:00 2001 From: Neerti Date: Mon, 15 Apr 2019 18:30:15 -0400 Subject: [PATCH] Merge pull request #6086 from Heroman3003/welder-fires Fixes self-refueling welders starting fires when off --- .../objects/items/weapons/tools/weldingtool.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index f024f45945..3a969562f8 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -121,15 +121,14 @@ remove_fuel(1) if(get_fuel() < 1) setWelding(0) - //I'm not sure what this does. I assume it has to do with starting fires... - //...but it doesnt check to see if the welder is on or not. - var/turf/location = src.loc - if(istype(location, /mob/living)) - var/mob/living/M = location - if(M.item_is_in_hands(src)) - location = get_turf(M) - if (istype(location, /turf)) - location.hotspot_expose(700, 5) + else //Only start fires when its on and has enough fuel to actually keep working + var/turf/location = src.loc + if(istype(location, /mob/living)) + var/mob/living/M = location + if(M.item_is_in_hands(src)) + location = get_turf(M) + if (istype(location, /turf)) + location.hotspot_expose(700, 5) /obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) if(!proximity) return