Recipe types from shared scripts and stuff
This commit is contained in:
@@ -17,9 +17,9 @@ export function outputs(recipe: Recipe): Ingredient[] {
|
||||
switch (recipe.type) {
|
||||
case "shaped":
|
||||
return [stack(recipe.result)];
|
||||
case "furnace":
|
||||
case "bworld:smelting":
|
||||
return [stack(recipe.output)];
|
||||
case "fuel":
|
||||
case "bworld:fuel":
|
||||
return [];
|
||||
case "bworld:smithing":
|
||||
return [{ ids: [recipe.result], count: 1 }];
|
||||
@@ -46,7 +46,7 @@ export function fluid_inputs(recipe: Recipe): FluidAmount[] {
|
||||
return recipe.fluid_ingredients ?? [];
|
||||
}
|
||||
|
||||
// what a recipe takes. shaped keys, furnace inputs and fuels can be an item or #tag, or a list any of which fits
|
||||
// what a recipe takes. shaped keys, smelting inputs and fuels can be an item or #tag, or a list any of which fits
|
||||
export function inputs(recipe: Recipe, tags: TagApi): Ingredient[] {
|
||||
switch (recipe.type) {
|
||||
case "shaped":
|
||||
@@ -54,9 +54,9 @@ export function inputs(recipe: Recipe, tags: TagApi): Ingredient[] {
|
||||
ids: tags.expand(choice),
|
||||
count: 1,
|
||||
}));
|
||||
case "furnace":
|
||||
case "bworld:smelting":
|
||||
return [{ ids: tags.expand(recipe.input), count: 1 }];
|
||||
case "fuel":
|
||||
case "bworld:fuel":
|
||||
return [{ ids: tags.expand(recipe.item), count: 1 }];
|
||||
case "bworld:smithing":
|
||||
return [{ ids: [recipe.tool], count: 1 }, stack(recipe.material)].concat(
|
||||
|
||||
Reference in New Issue
Block a user