# Crafting a material in a can seperate from that can

**URL:** <https://discourse.cataclysmdda.org/t/crafting-a-material-in-a-can-seperate-from-that-can/8647>\
**Category:** The Toolbox\
**Created:** [January 17, 2015, 5:10am UTC](https://discourse.cataclysmdda.org/t/crafting-a-material-in-a-can-seperate-from-that-can/8647 "2015-01-17T05:10:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaltyJustice](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/saltyjustice/32/1180_2.png) [@SaltyJustice](https://discourse.cataclysmdda.org/u/SaltyJustice)\
**Post date:** [January 17, 2015, 5:10am UTC](https://discourse.cataclysmdda.org/t/crafting-a-material-in-a-can-seperate-from-that-can/8647/1 "2015-01-17T05:10:50Z")

</div>

Long time follower, first time poster. Blah blah.

Here’s my issue in the mod I’m making: I want the player to be able to craft an item using soda, which is typically found inside a can. However, when I specify the various soda types (ex: creamsoda) the crafting menu requires that I have both an empty can and the cream soda stored inside its can. Is there any way I can make the recipe call for the soda within its can? Or will I have to force the player to have a spare can lying around?

The ingredients list currently looks like this:

` "components": [
    [
      ["canister_empty", 1],
      ["can_drink", 1],
      ["can_food", 1]
    ],
    [
      ["mystery_item_what_could_it_be", 1]
    ],
    [
      ["cola", 1],
      ["creamsoda", 1],
      ["orangesoda", 1],
      ["colamdew", 1],
      ["rootbeer", 1],
      ["spezi", 1],
      ["crispycran", 1],
      ["purple_drink", 1],
      ["lemonlime", 1]
    ]
  ]`

---

<div class="post-metadata">

**Author:** ![KA101](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KA101](https://discourse.cataclysmdda.org/u/KA101)\
**Post date:** [January 17, 2015, 10:21pm UTC](https://discourse.cataclysmdda.org/t/crafting-a-material-in-a-can-seperate-from-that-can/8647/2 "2015-01-17T22:21:01Z")

</div>

Currently, no: same problem as needing an empty bottle to make a molotov and not being able to boil water and planning to put it back in the container. Code doesn’t check to see that your crafting would empty a container before checking for the container.

Sorry, but welcome to the forums.
