Region file format

This commit is contained in:
2026-09-27 23:45:07 -03:00
parent a6869eeb59
commit 677ad8115a
18 changed files with 666 additions and 567 deletions
+3 -3
View File
@@ -133,12 +133,12 @@ Deno.test("the host serves each mod's player copy by its hash, and a game made f
`${build}/assets/textures/index.json`,
JSON.stringify(ENGINE_TEXTURES.slice(1).map((id) => id.split(":")[1])),
);
const world = `${build}/world.json`;
const world = `${build}/world`;
const host = await start_host({
build_dir: build,
server_mods_dir: folder,
world_file: world,
world_dir: world,
seed: "bmod-seed",
on_fatal: (message) => {
throw new Error(message);
@@ -156,7 +156,7 @@ Deno.test("the host serves each mod's player copy by its hash, and a game made f
// the game worker loaded both mods, including the template's server script, and saves
await host.shutdown();
const saved = JSON.parse(Deno.readTextFileSync(world));
const saved = JSON.parse(Deno.readTextFileSync(`${world}/level.json`));
assertEquals(saved.seed, "bmod-seed");
for (const dir of [sources, folder, build]) Deno.removeSync(dir, { recursive: true });