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:
@@ -206,6 +206,9 @@ function createRecipe(data) {
|
|||||||
}
|
}
|
||||||
} else if (itemRecipe === undefined) {
|
} else if (itemRecipe === undefined) {
|
||||||
missingMaterials.add(1, name);
|
missingMaterials.add(1, name);
|
||||||
|
if (! consumeItems) {
|
||||||
|
inventory.add(1, name);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
itemRecipe.craft(inventory, missingMaterials);
|
itemRecipe.craft(inventory, missingMaterials);
|
||||||
if (consumeItems) {
|
if (consumeItems) {
|
||||||
|
|||||||
Reference in New Issue
Block a user