From e1e52c17b71ade5bd698ffad3e02aab110e79a50 Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Wed, 11 Jan 2023 22:17:03 -0800 Subject: [PATCH] Mirrors 72397 (#18646) Boxes created through the crafting menu no longer spawn with their contents full (#72397) ## About The Pull Request What it says on the tin. Since the contents weren't emptied you could get infinite beakers, donk pockets, chicken nuggets etc. by making and remaking a box over and over. Fixes #72385. ## Why It's Good For The Game Bugfix. The world does not deserve infinite chicken nuggets yet ## Changelog :cl: fix: Boxes created through the crafting menu no longer spawn with their contents full /:cl: Co-authored-by: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com> --- code/datums/components/crafting/crafting.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 01cd79d8a45..1033c224578 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -184,6 +184,9 @@ I = new R.result (get_turf(a.loc), R.result_amount || 1) else I = new R.result (get_turf(a.loc)) + if(I.atom_storage) + for(var/obj/item/thing in I) + qdel(thing) I.CheckParts(parts, R) if(send_feedback) SSblackbox.record_feedback("tally", "object_crafted", 1, I.type)