Rename bmod to just mod
This commit is contained in:
@@ -6,7 +6,7 @@ import { EverythingRegistry } from "@/common/everything_registry.ts";
|
||||
import type { FluidJson } from "@/common/mod_data.ts";
|
||||
import type { ModListing } from "@/common/mod_loader.ts";
|
||||
import type { FluidApi } from "@/common/mod_api/shared.ts";
|
||||
import { read_bmod } from "@/common/bmod.ts";
|
||||
import { read_mod } from "@/common/mod.ts";
|
||||
import { register_mod_data } from "@/common/mod_loader.ts";
|
||||
import { load_client_mods } from "@/client/mods.ts";
|
||||
import { fluid_rules } from "@/client/fluid_rules.ts";
|
||||
@@ -38,7 +38,7 @@ 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 () => {
|
||||
Deno.test("a mod's fluids/ file registers a fluid, packed into its .cubi", async () => {
|
||||
const dir = Deno.makeTempDirSync({ prefix: "bworld_fluids_" });
|
||||
const syrup = { id: "testfluids:syrup", name: "Maple Syrup", color: "#a0522d", texture: "testfluids:syrup_still" };
|
||||
fluid_mod(dir, { "syrup.json": syrup });
|
||||
@@ -48,9 +48,9 @@ Deno.test("a mod's fluids/ file registers a fluid, packed into its .bmod", async
|
||||
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");
|
||||
const mod = read_mod(await pack_mod(mods[0]), "testfluids.cubi");
|
||||
EverythingRegistry.clear();
|
||||
register_mod_data([{ id: "testfluids", data: bmod.data }]);
|
||||
register_mod_data([{ id: "testfluids", data: mod.data }]);
|
||||
assertEquals(EverythingRegistry.get<FluidJson>("fluids", "testfluids:syrup"), syrup);
|
||||
Deno.removeSync(dir, { recursive: true });
|
||||
});
|
||||
@@ -87,11 +87,11 @@ async function both_sides(ask: (fluids: FluidApi) => unknown) {
|
||||
const server = ask(game.mods.fluid_rules.api());
|
||||
|
||||
const mod = load_and_check(dir).find((m) => m.id === "testfluids")!;
|
||||
const bmod = read_bmod(await pack_mod(mod), "testfluids.bmod");
|
||||
const packed = read_mod(await pack_mod(mod), "testfluids.cubi");
|
||||
Deno.removeSync(dir, { recursive: true });
|
||||
const listing: ModListing = { id: "testfluids", name: "Test", version: "1.0.0", sha256: "", file: "", size: 0 };
|
||||
EverythingRegistry.clear();
|
||||
await load_client_mods([listing], [bmod]);
|
||||
await load_client_mods([listing], [packed]);
|
||||
return { server, client: ask(fluid_rules.api()) };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user