From e4e8f0086062007ac647cc29b4184ce48e21a747 Mon Sep 17 00:00:00 2001 From: TheCarlSaganExpress Date: Wed, 17 Aug 2016 05:20:00 -0400 Subject: [PATCH] Fixed welders turning off other light sources. (#19907) * Fixes welding glitch #19883. * Fixes welding glitch #19883. * Minor adjustments. --- code/game/objects/items/weapons/tools.dm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index c5c4aa37f63..d57c948c746 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -218,7 +218,6 @@ w_class = 2 - materials = list(MAT_METAL=70, MAT_GLASS=30) origin_tech = "engineering=1;plasmatech=1" var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) @@ -332,8 +331,6 @@ if(welding) SetLuminosity(0) user.AddLuminosity(light_intensity) - else - user.AddLuminosity(-light_intensity) update_icon() @@ -396,9 +393,8 @@ obj/item/weapon/weldingtool/proc/switched_on(mob/user) //Switches the welder off obj/item/weapon/weldingtool/proc/switched_off(mob/user) welding = 0 - var/mob/Player = loc - if(ismob(loc)) //If player is holding the welder - Player.AddLuminosity(-light_intensity) + if(user == loc) //If player is holding the welder + user.AddLuminosity(-light_intensity) SetLuminosity(0) else SetLuminosity(0)