mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-17 20:47:29 +00:00
## About The Pull Request https://github.com/user-attachments/assets/155210d1-d0ae-404e-b69c-a0d185306db6 ### Added container rustle sounds for: - medkit - box - toolbox ### Added container open sounds for: - box - toolbox ### De-hard coded container rustle sounds so now you can change the sound path on subtypes. ## Why It's Good For The Game - Hearing the same cloth rustling SFX for boxes, toolboxes and medkits, when they're clearly not made of cloth is immersion breaking, let's fix that. - giving players satisfying sounds when they open containers and an overall diversity of sounds will reduce ear fatigue - rustle SFX were previously hard coded and you couldn't change them or change the `vary` boolean, we should keep the code customizable and allow contributors to add more rustle sounds by implementing this framework. ## Changelog 🆑 grungussuss sound: added rustle sounds for: toolbox, medkit, box sound: added open sounds for: toolbox, box code: added support for giving container items rustle sounds /🆑
56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
/// The common cardboard box.
|
|
/obj/item/storage/box
|
|
name = "box"
|
|
desc = "It's just an ordinary box."
|
|
icon = 'icons/obj/storage/box.dmi'
|
|
icon_state = "box"
|
|
inhand_icon_state = "syringe_kit"
|
|
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
|
resistance_flags = FLAMMABLE
|
|
drop_sound = 'sound/items/handling/cardboardbox_drop.ogg'
|
|
pickup_sound = 'sound/items/handling/cardboardbox_pickup.ogg'
|
|
/// What material do we get when we fold this box?
|
|
var/foldable_result = /obj/item/stack/sheet/cardboard
|
|
/// What drawing will we get on the face of the box?
|
|
var/illustration = "writing"
|
|
|
|
/obj/item/storage/box/Initialize(mapload)
|
|
. = ..()
|
|
atom_storage.max_specific_storage = WEIGHT_CLASS_SMALL
|
|
update_appearance()
|
|
atom_storage.open_sound = 'sound/items/cardboard_box_open.ogg'
|
|
atom_storage.rustle_sound = 'sound/items/cardboard_box_rustle.ogg'
|
|
|
|
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
|
|
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
|
if(myhead)
|
|
user.visible_message(span_suicide("[user] puts [user.p_their()] head into \the [src] and begins closing it! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
myhead.dismember()
|
|
myhead.forceMove(src) //force your enemies to kill themselves with your head collection box!
|
|
playsound(user, "desecration-01.ogg", 50, TRUE, -1)
|
|
return BRUTELOSS
|
|
user.visible_message(span_suicide("[user] is beating [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
return BRUTELOSS
|
|
|
|
/obj/item/storage/box/update_overlays()
|
|
. = ..()
|
|
if(illustration)
|
|
. += illustration
|
|
|
|
/obj/item/storage/box/attack_self(mob/user)
|
|
..()
|
|
|
|
if(!foldable_result || (flags_1 & HOLOGRAM_1))
|
|
return
|
|
if(contents.len)
|
|
balloon_alert(user, "items inside!")
|
|
return
|
|
if(!ispath(foldable_result))
|
|
return
|
|
|
|
var/obj/item/result = new foldable_result(user.drop_location())
|
|
balloon_alert(user, "folded")
|
|
qdel(src)
|
|
user.put_in_hands(result)
|