Fix delivery chute runtime (#40723)

* Fixes delivery chute runtime
* Broken glass fix
This commit is contained in:
ShizCalev
2018-10-09 11:40:09 -07:00
committed by Tad Hardesty
parent 97293d4f12
commit 567e9eac9f
3 changed files with 8 additions and 3 deletions
@@ -121,10 +121,12 @@
B.icon = I
B.name = "broken [name]"
if(prob(33))
new/obj/item/shard(drop_location())
var/obj/item/shard/S = new(drop_location())
target.Bumped(S)
playsound(src, "shatter", 70, 1)
transfer_fingerprints_to(B)
qdel(src)
target.Bumped(B)
@@ -303,6 +305,7 @@
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
transfer_fingerprints_to(B)
qdel(src)
target.Bumped(B)
/obj/item/reagent_containers/food/drinks/sillycup/smallcarton/on_reagent_change(changetype)
if (reagents.reagent_list.len)
@@ -32,7 +32,8 @@
if(isGlass)
if(prob(33))
new/obj/item/shard(drop_location())
var/obj/item/shard/S = new(drop_location())
target.Bumped(S)
playsound(src, "shatter", 70, 1)
else
B.force = 0
@@ -42,6 +43,7 @@
transfer_fingerprints_to(B)
qdel(src)
target.Bumped(B)
/obj/item/reagent_containers/food/drinks/bottle/attack(mob/living/target, mob/living/user)
+1 -1
View File
@@ -456,7 +456,7 @@
flush()
/obj/machinery/disposal/deliveryChute/Bumped(atom/movable/AM) //Go straight into the chute
if(!AM.CanEnterDisposals())
if(QDELETED(AM) || !AM.CanEnterDisposals())
return
switch(dir)
if(NORTH)