Fixes forks producing trash/not leaving trash

Fixes #4059
Forks now don't produce trash when eaten off
Forks now do leave trash when taking the last bit of food from the
original item
This commit is contained in:
VampyrBytes
2016-04-01 08:05:57 +01:00
parent 80ae4bff80
commit 48ba721b91
@@ -98,10 +98,18 @@
var/obj/item/weapon/reagent_containers/food/snacks/collected = new type
collected.loc = U
collected.reagents.remove_any(collected.reagents.total_volume)
collected.trash = null
if(reagents.total_volume > bitesize)
reagents.trans_to(collected, bitesize)
else
reagents.trans_to(collected, reagents.total_volume)
if(trash)
var/obj/item/TrashItem
if(ispath(trash,/obj/item))
TrashItem = new trash(src)
else if(istype(trash,/obj/item))
TrashItem = trash
TrashItem.forceMove(loc)
qdel(src)
return 1