From 3fd82d39c51b307cb771ac754a52492683e61be1 Mon Sep 17 00:00:00 2001 From: SierraKomodo <11140088+SierraKomodo@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:32:06 +0300 Subject: [PATCH] [MIRROR] Fix holster belts not holstering on click --- code/game/objects/items/weapons/storage/belt.dm | 13 +++++++------ test/check-paths.sh | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 8e4ef82881948..f7de70a62706b 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -65,12 +65,13 @@ . = ..() set_extension(src, /datum/extension/holster, src, sound_in, sound_out, can_holster) -/obj/item/storage/belt/holster/attackby(obj/item/W as obj, mob/user as mob) - var/datum/extension/holster/H = get_extension(src, /datum/extension/holster) - if(H.holster(W, user)) - return - else - . = ..(W, user) +/obj/item/storage/belt/holster/use_tool(obj/item/tool, mob/living/user, list/click_params) + // Holster + var/datum/extension/holster/holster = get_extension(src, /datum/extension/holster) + if (holster.can_holster(tool) && holster.holster(tool, user)) + return TRUE + + return ..() /obj/item/storage/belt/holster/attack_hand(mob/user as mob) var/datum/extension/holster/H = get_extension(src, /datum/extension/holster) diff --git a/test/check-paths.sh b/test/check-paths.sh index dc18c8c5210fc..093cd3fc1c023 100755 --- a/test/check-paths.sh +++ b/test/check-paths.sh @@ -57,7 +57,7 @@ exactly 0 "simulated = 0/1" 'simulated\s*=\s*\d' -P exactly 2 "var/ in proc arguments" '(^/[^/].+/.+?\(.*?)var/' -P exactly 0 "tmp/ vars" 'var.*/tmp/' -P exactly 7 "uses of .len" '\.len\b' -P -exactly 376 "attackby() override" '\/attackby\((.*)\)' -P +exactly 375 "attackby() override" '\/attackby\((.*)\)' -P exactly 15 "uses of examine()" '[.|\s]examine\(' -P # If this fails it's likely because you used '/atom/proc/examine(mob)' instead of '/proc/examinate(mob, atom)' - Exception: An examine()-proc may call other examine()-procs exactly 7 "direct modifications of overlays list" '\boverlays((\s*[|^=+&-])|(\.(Cut)|(Add)|(Copy)|(Remove)|(Remove)))' -P exactly 0 "new/list list instantiations" 'new\s*/list' -P