World shape for dimension
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
type BiomeSourceJson,
|
||||
density_function_refs,
|
||||
type DensityFunctionJson,
|
||||
dimension_shape,
|
||||
type DimensionJson,
|
||||
new_refs,
|
||||
noise_refs,
|
||||
@@ -38,6 +39,7 @@ import {
|
||||
type WorldgenRefs,
|
||||
} from "./worldgen/data.ts";
|
||||
import { feature_refs, type FeatureJson } from "./worldgen/features.ts";
|
||||
import { cell_height_problem } from "./world_shape.ts";
|
||||
import type { ModData } from "./mod_loader.ts";
|
||||
|
||||
export interface ModReport {
|
||||
@@ -422,6 +424,12 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
|
||||
if (!worldgen_owners["noise settings"].has(json.generator)) {
|
||||
errors.push(`${file}: noise settings ${json.generator} doesn't exist`);
|
||||
}
|
||||
const settings = all_noise_settings.find((settings) => settings.id === json.generator);
|
||||
const problem = settings && cell_height_problem(
|
||||
dimension_shape(json),
|
||||
[settings.terrain.cell_height, settings.caves.cell_height],
|
||||
);
|
||||
if (problem) errors.push(`${file}: can't be generated by ${json.generator}: ${problem}`);
|
||||
if (json.default && defaults.length > 1) {
|
||||
errors.push(
|
||||
`${file}: only one dimension can be the default, and these all are: ${defaults.join(", ")}`,
|
||||
|
||||
Reference in New Issue
Block a user