Fluid and item visuals
This commit is contained in:
@@ -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 }]);
|
||||
|
||||
Reference in New Issue
Block a user