Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Feb 24, 2024
1 parent cbf06e2 commit 957c0a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -919,18 +919,20 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.

. = ..()
var/volume = GetThrownSoundVolume()
var/turf/sound_turf = get_turf(src)
//Living mobs handle thrown sounds differently.
if(istype(hit_atom, /mob/living))
sound_turf = get_turf(hit_atom)
if(throwforce > 0)
if(mob_throw_hit_sound)
playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1)
playsound(sound_turf, mob_throw_hit_sound, volume, FALSE, -1)
else if(hitsound)
playsound(hit_atom, hitsound, volume, TRUE, -1)
playsound(sound_turf, hitsound, volume, FALSE, -1)
else if(throw_impact_sound)
playsound(hit_atom, throw_impact_sound, volume, TRUE, -1)
playsound(sound_turf, throw_impact_sound, volume, FALSE, -1)

else if(throw_impact_sound)
playsound(src, throw_impact_sound, volume, TRUE, -1)
playsound(sound_turf, throw_impact_sound, volume, FALSE, -1)

/obj/item/proc/GetThrownSoundVolume()
return min(INITIAL_THROW_IMPACT_SOUND_VOLUME * w_class, 100)
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@
icon_state = "ammo"
desc = "A sturdy metal box with several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
use_sound = 'sound/effects/closet_open.ogg'
pickup_sound = 'sound/items/handling/ammobox_pickup.ogg'
throw_impact_sound = 'sound/items/handling/ammobox_drop.ogg'

/obj/item/storage/box/ammo/blanks
name = "box of blank shells"
Expand Down

0 comments on commit 957c0a3

Please sign in to comment.