From 2465e5cdc18ba32739c97c4e8a5e98a1089fed03 Mon Sep 17 00:00:00 2001 From: A miscellaneous Fern <80640114+FernandoJ8@users.noreply.github.com> Date: Mon, 2 Jan 2023 22:26:59 +0100 Subject: [PATCH] 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: --- 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)