mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Add a mode to muffle items.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#define DM_FLAG_JAMSENSORS 0x20
|
||||
#define DM_FLAG_FORCEPSAY 0x40
|
||||
#define DM_FLAG_SLOWBODY 0x80 //CHOMPAdd
|
||||
#define DM_FLAG_MUFFLEITEMS 0x100 //CHOMPAdd
|
||||
|
||||
//Item related modes
|
||||
#define IM_HOLD "Hold"
|
||||
|
||||
@@ -361,12 +361,13 @@
|
||||
if(user.client) user.client.screen |= src
|
||||
if(user.pulling == src) user.stop_pulling()
|
||||
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)
|
||||
return
|
||||
|
||||
// As above but for items being equipped to an active module on a robot.
|
||||
|
||||
@@ -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)
|
||||
|
||||
/*
|
||||
@@ -495,4 +503,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"
|
||||
|
||||
@@ -237,7 +237,12 @@
|
||||
|
||||
/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)
|
||||
playsound(src, src.use_sound, 50, 0, -5)
|
||||
// Chomp edit end
|
||||
|
||||
orient2hud(user)
|
||||
if(user.s_active)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
//Actual full digest modes
|
||||
var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ABSORB,DM_DRAIN,DM_SELECT,DM_UNABSORB,DM_HEAL,DM_SHRINK,DM_GROW,DM_SIZE_STEAL,DM_EGG)
|
||||
//Digest mode addon flags
|
||||
var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Stripping" = DM_FLAG_STRIPPING, "Leave Remains" = DM_FLAG_LEAVEREMAINS, "Muffles" = DM_FLAG_THICKBELLY, "Affect Worn Items" = DM_FLAG_AFFECTWORN, "Jams Sensors" = DM_FLAG_JAMSENSORS, "Complete Absorb" = DM_FLAG_FORCEPSAY, "Slow Body Digestion" = DM_FLAG_SLOWBODY) //CHOMPEdit
|
||||
var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Stripping" = DM_FLAG_STRIPPING, "Leave Remains" = DM_FLAG_LEAVEREMAINS, "Muffles" = DM_FLAG_THICKBELLY, "Affect Worn Items" = DM_FLAG_AFFECTWORN, "Jams Sensors" = DM_FLAG_JAMSENSORS, "Complete Absorb" = DM_FLAG_FORCEPSAY, "Slow Body Digestion" = DM_FLAG_SLOWBODY, "Muffle Items" = DM_FLAG_MUFFLEITEMS) //CHOMPEdit
|
||||
//Item related modes
|
||||
var/tmp/static/list/item_digest_modes = list(IM_HOLD,IM_DIGEST_FOOD,IM_DIGEST,IM_DIGEST_PARALLEL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user