Move world generation outside the engine and into mods and data files

This commit is contained in:
2026-10-11 00:33:59 -03:00
parent afe6e03d4c
commit 3d2b235f64
118 changed files with 8250 additions and 1108 deletions
+6 -1
View File
@@ -116,7 +116,12 @@ Deno.test("the server loads every .bmod in its folder, dependencies first, and p
assertEquals(copy.scripts.server, undefined, "server scripts never go to players");
assertEquals(copy.scripts.worldgen, undefined, "players get the world from the server, not its generator");
assertEquals(copy.scripts.shared, mod.bmod.scripts.shared, "players run the shared rules too");
assertEquals(copy.data, mod.bmod.data);
// the terrain's data stays on the server too, the rest is the same
const { noises, density_functions, noise_settings, biome_sources, ...data } = mod.bmod.data;
assertEquals(copy.data, { ...data, noises: [], density_functions: [], noise_settings: [], biome_sources: [] });
if (mod.listing.id === "bworld") {
assert([noises, density_functions, noise_settings, biome_sources].every((list) => list!.length > 0));
}
}
assert(mods[1].bmod.scripts.server, "the server still has it");