Dimension api
This commit is contained in:
+5
-3
@@ -124,10 +124,12 @@ Deno.test("the server loads every .cubi in its folder, dependencies first, and p
|
||||
assertEquals(copy.scripts.worldgen, undefined, "players get the world from the server, not its generator");
|
||||
assertEquals(copy.scripts.shared, mod.mod.scripts.shared, "players run the shared rules too");
|
||||
// the terrain's data stays on the server too, the rest is the same
|
||||
const { noises, density_functions, noise_settings, biome_sources, ...data } = mod.mod.data;
|
||||
assertEquals(copy.data, { ...data, noises: [], density_functions: [], noise_settings: [], biome_sources: [] });
|
||||
const { noises, density_functions, noise_settings, biome_sources, dimensions, ...data } = mod.mod.data;
|
||||
const none = { noises: [], density_functions: [], noise_settings: [], biome_sources: [], dimensions: [] };
|
||||
assertEquals(copy.data, { ...data, ...none });
|
||||
if (mod.listing.id === "bworld") {
|
||||
assert([noises, density_functions, noise_settings, biome_sources].every((list) => list!.length > 0));
|
||||
const terrain = [noises, density_functions, noise_settings, biome_sources, dimensions];
|
||||
assert(terrain.every((list) => list!.length > 0));
|
||||
}
|
||||
}
|
||||
assert(mods[1].mod.scripts.server, "the server still has it");
|
||||
|
||||
Reference in New Issue
Block a user