Better recipe api and port smithing to it
This commit is contained in:
@@ -92,7 +92,7 @@ function base_categories(tags: TagApi): RecipeCategory[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "smithing",
|
||||
type: "bworld:smithing",
|
||||
title: "Smithing",
|
||||
width: 108,
|
||||
height: 18,
|
||||
@@ -325,7 +325,6 @@ export function category_name(type: string): string {
|
||||
shaped: "Crafting",
|
||||
furnace: "Smelting",
|
||||
fuel: "Fuel",
|
||||
smithing: "Smithing",
|
||||
[FISHING]: "Fishing",
|
||||
[CRABPOT]: "Crab Pot",
|
||||
[JUICING]: "Juicing",
|
||||
|
||||
@@ -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