Merge pull request #5555 from lbnesquik/kot-muffle-item

Add a mode to muffle items.
This commit is contained in:
Nadyr
2023-02-02 20:35:44 -05:00
committed by GitHub
6 changed files with 38 additions and 8 deletions

View File

@@ -360,13 +360,16 @@
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)
if(equip_sound && !muffled_by_belly(user))
playsound(src, equip_sound, 20)
else
else if(!muffled_by_belly(user))
playsound(src, drop_sound, 20)
else if(slot == slot_l_hand || slot == slot_r_hand)
playsound(src, pickup_sound, 20, preference = /datum/client_preference/pickup_sounds)
if(!muffled_by_belly(user))
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.

View File

@@ -22,7 +22,15 @@
/obj/item/weapon/storage/backpack/equipped(var/mob/user, var/slot)
if (slot == slot_back && src.use_sound)
playsound(src, src.use_sound, 50, 1, -5)
// Chomp edit
if(isbelly(user.loc))
var/obj/belly/B = user.loc
if(B.mode_flags & DM_FLAG_MUFFLEITEMS)
return
else
// Chomp edit end
playsound(src, src.use_sound, 50, 1, -5)
..(user, slot)
/*
@@ -549,4 +557,4 @@
desc = "A satchel designed for the Go Go ERT Rangers series to allow for slightly bigger carry capacity for the ERT-Rangers.\
Unlike the show claims, it is not a phoron-enhanced satchel of holding with plot-relevant content."
icon = 'icons/obj/clothing/ranger.dmi'
icon_state = "ranger_satchel"
icon_state = "ranger_satchel"

View File

@@ -237,7 +237,14 @@
/obj/item/weapon/storage/proc/open(mob/user as mob)
if (use_sound)
playsound(src, src.use_sound, 50, 0, -5)
// Chomp edit
if(isbelly(user.loc))
var/obj/belly/B = user.loc
if(B.mode_flags & DM_FLAG_MUFFLEITEMS)
// Do nothing
else
playsound(src, src.use_sound, 50, 0, -5)
// Chomp edit end
orient2hud(user)
if(user.s_active)

View File

@@ -24,4 +24,15 @@
possessed_voice.Add(new_voice)
listening_objects |= src
new_voice.verbs -= /mob/living/voice/verb/change_name //No changing your name! Bad!
new_voice.verbs -= /mob/living/voice/verb/hang_up //Also you can't hang up. You are the item!
new_voice.verbs -= /mob/living/voice/verb/hang_up //Also you can't hang up. You are the item!
// Chomp edit
/obj/item/proc/muffled_by_belly(var/mob/user)
if(isbelly(user.loc))
var/obj/belly/B = user.loc
if(B.mode_flags & DM_FLAG_MUFFLEITEMS)
return TRUE
return FALSE
else
return FALSE
// Chomp edit end