mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Refactors inventory items code to allow to play custom sounds, adds custom sounds to pill bottles and patch packs (#21634)
* Removed dupe playsound, sound now uses var * pill bottles now have sounds * Patch packs also have sounds * Increased patch packs volume by 4db * Moved sounds to folder, added licence and credits. * Fixed invalid sound paths
This commit is contained in:
@@ -255,6 +255,7 @@
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
item_state = "contsolid"
|
||||
belt_icon = "pill_bottle"
|
||||
use_sound = "pillbottle"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
can_hold = list(/obj/item/reagent_containers/food/pill)
|
||||
cant_hold = list(/obj/item/reagent_containers/food/pill/patch)
|
||||
@@ -361,6 +362,7 @@
|
||||
desc = "It's a container for storing medical patches."
|
||||
icon_state = "patch_pack"
|
||||
belt_icon = "patch_pack"
|
||||
use_sound = "patchpack"
|
||||
can_hold = list(/obj/item/reagent_containers/food/pill/patch)
|
||||
cant_hold = list()
|
||||
rapid_intake_message = "flips the lid of the patch pack open and begins rapidly stamping patches on themselves!"
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
var/pickup_all_on_tile = TRUE
|
||||
/// Sound played when used. `null` for no sound.
|
||||
var/use_sound = "rustle"
|
||||
|
||||
/// What kind of [/obj/item/stack] can this be folded into. (e.g. Boxes and cardboard)
|
||||
var/foldable = null
|
||||
/// How much of the stack item do you get.
|
||||
@@ -141,7 +140,6 @@
|
||||
return ..()
|
||||
if(!(loc == M) || (loc && loc.loc == M))
|
||||
return
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
if(!M.restrained() && !M.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
@@ -163,7 +161,7 @@
|
||||
. = ..()
|
||||
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE))
|
||||
show_to(user)
|
||||
playsound(loc, "rustle", 50, TRUE, -5)
|
||||
playsound(loc, use_sound, 50, TRUE, -5)
|
||||
add_fingerprint(user)
|
||||
else if(isobserver(user))
|
||||
show_to(user)
|
||||
@@ -549,7 +547,7 @@
|
||||
|
||||
|
||||
/obj/item/storage/attack_hand(mob/user)
|
||||
playsound(loc, "rustle", 50, TRUE, -5)
|
||||
playsound(loc, use_sound, 50, TRUE, -5)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
Reference in New Issue
Block a user