From ff0a4d69301152e7a147b2c4d74df67d030aed56 Mon Sep 17 00:00:00 2001 From: CHOMPStation2 <58959929+CHOMPStation2@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:00:22 -0700 Subject: [PATCH] [MIRROR] fixes equip/dequip noises from not playing (#6806) Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Raeschen --- code/game/objects/items.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 57aa00fe99..7645988415 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -364,16 +364,14 @@ user.position_hud_item(src,slot) if(user.client) user.client.screen |= src if(user.pulling == src) user.stop_pulling() - // Chomp edit starts - if((slot_flags & slot)) - if(equip_sound && !muffled_by_belly(user)) - playsound(src, equip_sound, 20) - else if(!muffled_by_belly(user)) - playsound(src, drop_sound, 20) + if(("[slot]" in slot_flags_enumeration) && (slot_flags & slot_flags_enumeration["[slot]"])) + if(equip_sound && !muffled_by_belly(user)) //ChompEDIT + playsound(src, equip_sound, 20, preference = /datum/client_preference/pickup_sounds) + else if(!muffled_by_belly(user)) //ChompEDIT + playsound(src, drop_sound, 20, preference = /datum/client_preference/pickup_sounds) else if(slot == slot_l_hand || slot == slot_r_hand) - if(!muffled_by_belly(user)) + if(!muffled_by_belly(user)) //ChompEDIT playsound(src, pickup_sound, 20, preference = /datum/client_preference/pickup_sounds) - // Chomp edit stops return // As above but for items being equipped to an active module on a robot.