Fix bug with non-crafted tools being lost

* If a "tool" is also a raw material (e.g., as a "cow" is for producing milk),
  be sure to add it to the inventory so that it shows up as one of the outputs
This commit is contained in:
Andrew Miner
2013-08-18 19:27:38 -07:00
parent 608414088c
commit e16c3c0f68
+3
View File
@@ -206,6 +206,9 @@ function createRecipe(data) {
}
} else if (itemRecipe === undefined) {
missingMaterials.add(1, name);
if (! consumeItems) {
inventory.add(1, name);
}
} else {
itemRecipe.craft(inventory, missingMaterials);
if (consumeItems) {