From 2a1ff291cbf10f3f558c872f87aa3716602c2f4d Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 3 Dec 2022 13:58:35 +0200 Subject: [PATCH 1/2] Fixes shards having unlimited afterattack range Fixes glass shards and such being able to be smacked into anything on the screen regardless of the targets location to shatter and mess up your hands. --- code/game/objects/items/weapons/material/shards.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index f33c02f9a0..5389cd89e9 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -55,7 +55,9 @@ return return ..() -/obj/item/material/shard/afterattack(var/atom/target, mob/living/carbon/human/user as mob) +/obj/item/weapon/material/shard/afterattack(var/atom/target, mob/living/carbon/human/user as mob, proximity) + if(!proximity) + return var/active_hand //hand the shard is in var/will_break = FALSE var/protected_hands = FALSE //this is a fucking mess From 26a362af01b179b6422d1ad2570fc7a0f7b233ac Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 3 Dec 2022 16:53:38 +0200 Subject: [PATCH 2/2] Update code/game/objects/items/weapons/material/shards.dm Co-authored-by: Spookerton --- code/game/objects/items/weapons/material/shards.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index 5389cd89e9..3288a1f247 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -55,7 +55,7 @@ return return ..() -/obj/item/weapon/material/shard/afterattack(var/atom/target, mob/living/carbon/human/user as mob, proximity) +/obj/item/material/shard/afterattack(atom/target, mob/living/carbon/human/user, proximity) if(!proximity) return var/active_hand //hand the shard is in