[MIRROR] Fixes crafting duplication bug/runtime and attempts to address destroying items in consumed containers (#1270)

* Fixes crafting duplication bug/runtime and attempts to address destroying items in consumed containers

* Update global_lists.dm

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-10-13 02:15:26 +02:00
committed by GitHub
co-authored by Timberpoes Azarak
parent 6294b6666f
commit c98c1ee77b
3 changed files with 33 additions and 1 deletions
@@ -311,6 +311,14 @@
while(Deletion.len)
var/DL = Deletion[Deletion.len]
Deletion.Cut(Deletion.len)
// Snowflake handling of reagent containers and storage atoms.
// If we consumed them in our crafting, we should dump their contents out before qdeling them.
if(istype(DL, /obj/item/reagent_containers))
var/obj/item/reagent_containers/container = DL
container.reagents.expose(container.loc, TOUCH)
else if(istype(DL, /obj/item/storage))
var/obj/item/storage/container = DL
container.emptyStorage()
qdel(DL)
/datum/component/personal_crafting/proc/component_ui_interact(obj/screen/craft/image, location, control, params, user)