Rename all "liquid" mentions to "fluid"

This commit is contained in:
2026-10-25 13:54:53 -03:00
parent bcca8fa4a5
commit 0cfa4d9b4a
58 changed files with 547 additions and 548 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ made down its left side, the category and the page between their arrows, then th
them, Backspace goes back, and Escape or the inventory key (E) returns to the inventory.
It reads every mod's recipes with `ctx.recipes.list()`. Fish, the items with the base game's `bworld:fish` component,
get a Fishing category too: clicking one shows its seasons, biomes, hours and the liquid it's caught in, read with
get a Fishing category too: clicking one shows its seasons, biomes, hours and the fluid it's caught in, read with
`ctx.items.components`, and the fishing rod's uses are every fish. The crab pot gets one too: a recipe for each bait in
its `bworld:crabpot` component and each kind of water, showing everything that water's loot table can catch and how
likely each is, read with `ctx.blocks.components` and `ctx.loot.table`.
+3 -3
View File
@@ -131,7 +131,7 @@ function base_categories(tags: TagApi): RecipeCategory[] {
}`,
`Biomes: ${fish.biomes?.map(biome_name).join(", ") ?? "all"}`,
`Time: ${fish.time ? `${clock(fish.time.from)} to ${clock(fish.time.to)}` : "all day"}`,
`In: ${biome_name(fish.liquid ?? "bworld:water")}`,
`In: ${biome_name(fish.fluid ?? "bworld:water")}`,
];
lines.forEach((line, i) => layout.text(line, 24, 1 + i * 13));
},
@@ -169,7 +169,7 @@ interface FishParams {
seasons?: string[];
biomes?: string[];
time?: { from: number; to: number };
liquid?: string;
fluid?: string;
}
export function fishing_recipes(ctx: ClientContext): Recipe[] {
@@ -244,7 +244,7 @@ function title_case(name: string): string {
return name.split("_").map((word) => word[0].toUpperCase() + word.slice(1)).join(" ");
}
// a biome, liquid or #biome tag by its name: "bworld:swamp" is "Swamp", "#bworld:is_ocean" is "Ocean"
// a biome, fluid or #biome tag by its name: "bworld:swamp" is "Swamp", "#bworld:is_ocean" is "Ocean"
function biome_name(id: string): string {
return title_case(id.replace(/^#/, "").split(":")[1].replace(/^is_/, ""));
}