Fluid and item visuals

This commit is contained in:
2026-10-25 18:46:48 -03:00
parent 08df7f1b6b
commit 233c518def
15 changed files with 549 additions and 122 deletions
+5 -1
View File
@@ -40,10 +40,14 @@ function fluid_mod(dir: string, fluids: Record<string, unknown>, shared_script?:
Deno.test("a mod's fluids/ file registers a fluid, packed into its .bmod", async () => {
const dir = Deno.makeTempDirSync({ prefix: "bworld_fluids_" });
const syrup = { id: "testfluids:syrup", name: "Maple Syrup", color: "#a0522d" };
const syrup = { id: "testfluids:syrup", name: "Maple Syrup", color: "#a0522d", texture: "testfluids:syrup_still" };
fluid_mod(dir, { "syrup.json": syrup });
const mods = load_and_check(dir);
assertEquals(mods[0].report.errors, []);
// it has no textures
assertEquals(mods[0].report.warnings, [
"fluids/syrup.json: texture testfluids:syrup_still doesn't exist, it will show as missing",
]);
const bmod = read_bmod(await pack_mod(mods[0]), "testfluids.bmod");
EverythingRegistry.clear();
register_mod_data([{ id: "testfluids", data: bmod.data }]);