Fix delivery chute runtime (#40723)

* Fixes delivery chute runtime
* Broken glass fix
This commit is contained in:
ShizCalev
2018-10-09 14:40:09 -04:00
committed by yogstation13-bot
parent a026bcb305
commit c0620fe9cb
3 changed files with 8 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)

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)