Move world generation outside the engine and into mods and data files
This commit is contained in:
+6
-1
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user