mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Make too low vols and no soundin scream for playsound instead of failing silently (#89746)
…ing silently ## About The Pull Request While reviewing the recent sound optimization PR I noticed that a bunch of checks here really make no sense to just fail silently when nobody should be doing this in the first place Immediately started screaming on run so thats a good sign ## Changelog 🆑 code: previously silent failures due to empty sounds or too low volumes will now create a runtime in the runtime log fix: some footstep sounds like robotic or slimes are no longer silent /🆑 --------- Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
This commit is contained in:
committed by
Roxy
co-authored by
TiviPlus
parent
ed799aa9ee
commit
d72d51f0d5
@@ -720,7 +720,7 @@
|
||||
item_flags &= ~IN_INVENTORY
|
||||
UnregisterSignal(src, list(SIGNAL_ADDTRAIT(TRAIT_NO_WORN_ICON), SIGNAL_REMOVETRAIT(TRAIT_NO_WORN_ICON)))
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user)
|
||||
if(!silent)
|
||||
if(!silent && drop_sound)
|
||||
playsound(src, drop_sound, DROP_SOUND_VOLUME, vary = sound_vary, ignore_walls = FALSE)
|
||||
user?.update_equipment_speed_mods()
|
||||
|
||||
@@ -787,7 +787,7 @@
|
||||
if(!initial)
|
||||
if(equip_sound && (slot_flags & slot))
|
||||
playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE)
|
||||
else if(slot & ITEM_SLOT_HANDS)
|
||||
else if(slot & ITEM_SLOT_HANDS && pickup_sound)
|
||||
playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, sound_vary, ignore_walls = FALSE)
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
@@ -889,13 +889,16 @@
|
||||
if(throw_drop_sound)
|
||||
playsound(src, throw_drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE, vary = sound_vary)
|
||||
return
|
||||
playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE, vary = sound_vary)
|
||||
else if(drop_sound)
|
||||
playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE, vary = sound_vary)
|
||||
return
|
||||
|
||||
if(.) //it's been caught.
|
||||
return
|
||||
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if(!volume)
|
||||
return
|
||||
if (throwforce > 0 || HAS_TRAIT(src, TRAIT_CUSTOM_TAP_SOUND))
|
||||
if (mob_throw_hit_sound)
|
||||
playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1)
|
||||
@@ -904,7 +907,7 @@
|
||||
else
|
||||
playsound(hit_atom, 'sound/items/weapons/genhit.ogg',volume, TRUE, -1)
|
||||
else
|
||||
playsound(hit_atom, 'sound/items/weapons/throwtap.ogg', 1, volume, -1)
|
||||
playsound(hit_atom, 'sound/items/weapons/throwtap.ogg', volume, TRUE, -1)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, gentle = FALSE, quickstart = TRUE)
|
||||
if(HAS_TRAIT(src, TRAIT_NODROP))
|
||||
|
||||
Reference in New Issue
Block a user