Throwables Fix (#10066)

Catching fragile containers no longer causes them to shatter.
    Catching items no longer plays the hit by thrown item sound.
This commit is contained in:
Geeves
2020-09-27 16:12:49 +03:00
committed by GitHub
parent 61f0c6edec
commit 40b6a1b995
3 changed files with 12 additions and 1 deletions
+4
View File
@@ -287,6 +287,10 @@
/obj/item/throw_impact(atom/hit_atom)
..()
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
var/mob/living/L = hit_atom
if(L.in_throw_mode)
playsound(hit_atom, pickup_sound, PICKUP_SOUND_VOLUME, TRUE)
return
var/volume = get_volume_by_throwforce_and_or_w_class()
if(throwforce > 0)
if(mob_throw_hit_sound)
+1 -1
View File
@@ -60,7 +60,7 @@
/obj/item/reagent_containers/throw_impact(atom/hit_atom, var/speed)
. = ..()
if((speed >= fragile) && shatter)
if((speed >= fragile) && shatter && !ismob(loc))
shatter()
/obj/item/reagent_containers/proc/shatter(var/obj/item/W, var/mob/user)
@@ -0,0 +1,7 @@
author: Geeves
delete-after: True
changes:
- bugfix: "Catching fragile containers no longer causes them to shatter."
- bugfix: "Catching items no longer plays the hit by thrown item sound."