Better recipe api and port smithing to it
This commit is contained in:
@@ -21,7 +21,7 @@ export function outputs(recipe: Recipe): Ingredient[] {
|
||||
return [stack(recipe.output)];
|
||||
case "fuel":
|
||||
return [];
|
||||
case "smithing":
|
||||
case "bworld:smithing":
|
||||
return [{ ids: [recipe.result], count: 1 }];
|
||||
default: {
|
||||
// one item or stack, or a list of them, like what a cutting board cuts something into or a press presses
|
||||
@@ -58,7 +58,7 @@ export function inputs(recipe: Recipe, tags: TagApi): Ingredient[] {
|
||||
return [{ ids: tags.expand(recipe.input), count: 1 }];
|
||||
case "fuel":
|
||||
return [{ ids: tags.expand(recipe.item), count: 1 }];
|
||||
case "smithing":
|
||||
case "bworld:smithing":
|
||||
return [{ ids: [recipe.tool], count: 1 }, stack(recipe.material)].concat(
|
||||
recipe.addition ? [{ ids: [recipe.addition], count: 1 }] : [],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user