Skip to content

Commit

Permalink
[MIRROR] Fix holster belts not holstering on click
Browse files Browse the repository at this point in the history
  • Loading branch information
SierraKomodo authored and SuhEugene committed Dec 21, 2023
1 parent bfaa11e commit a94a468
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/check-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a94a468

Please sign in to comment.