Recipe types from shared scripts and stuff
This commit is contained in:
@@ -66,7 +66,7 @@ function base_categories(tags: TagApi): RecipeCategory[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "furnace",
|
||||
type: "bworld:smelting",
|
||||
title: "Smelting",
|
||||
width: 82,
|
||||
height: 54,
|
||||
@@ -80,7 +80,7 @@ function base_categories(tags: TagApi): RecipeCategory[] {
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "fuel",
|
||||
type: "bworld:fuel",
|
||||
title: "Fuel",
|
||||
width: 98,
|
||||
height: 36,
|
||||
@@ -323,8 +323,6 @@ export function make_categories(ctx: ClientContext, recipes: Recipe[]): RecipeCa
|
||||
export function category_name(type: string): string {
|
||||
const base: Record<string, string> = {
|
||||
shaped: "Crafting",
|
||||
furnace: "Smelting",
|
||||
fuel: "Fuel",
|
||||
[FISHING]: "Fishing",
|
||||
[CRABPOT]: "Crab Pot",
|
||||
[JUICING]: "Juicing",
|
||||
|
||||
@@ -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