From f89439a4ed0e6cb97dee7b1bb13deec4957ac6cc Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sun, 25 Feb 2024 11:36:17 -0800 Subject: [PATCH] FIx runtime since HAS_TRAIT doesn't null test --- code/game/objects/structures/barricade/barricade.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index 2dea5cd33050..313067ca6a56 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -387,7 +387,9 @@ update_health(-200) playsound(src.loc, 'sound/items/Welder2.ogg', 25, TRUE) - welder = user.get_active_hand() + var/current_tool = user.get_active_hand() + if(current_tool != welder) + return TRUE // Swapped hands or tool if(repeat && can_weld(welder, user, silent = TRUE)) // Assumption: The implementation of can_weld will return false if fully repaired if(!try_weld_cade(welder, user, repeat = TRUE, skip_check = TRUE))