30 lines
1.5 KiB
JavaScript
Executable File
30 lines
1.5 KiB
JavaScript
Executable File
// Original v7 preset: creation-time inputs, never a saved-world migration.
|
|
// Keep in sync with game defaults; map_meta.txt belongs exclusively to Luanti.
|
|
const NEW_WORLD = Object.freeze([
|
|
'mg_name = v7', 'fixed_map_seed = 731104', 'water_level = 1',
|
|
'mapgen_limit = 4096',
|
|
'mg_flags = caves,nodungeons,light,decorations,biomes,ores',
|
|
'mgv7_spflags = mountains,ridges,nofloatlands,caverns',
|
|
'mgv7_mount_zero_level = 0',
|
|
'mgv7_np_terrain_base = 12, 45, (384, 384, 384), 82341, 5, 0.6, 2.0',
|
|
'mgv7_np_terrain_alt = 12, 28, (384, 384, 384), 5934, 5, 0.6, 2.0',
|
|
'mgv7_np_terrain_persist = 0.6, 0.1, (1200, 1200, 1200), 539, 3, 0.6, 2.0',
|
|
'mgv7_np_height_select = -8, 16, (320, 320, 320), 4213, 6, 0.7, 2.0',
|
|
'mgv7_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0',
|
|
'mgv7_np_mount_height = 250, 100, (700, 700, 700), 72449, 3, 0.6, 2.0',
|
|
'mgv7_np_mountain = -0.6, 1, (180, 280, 180), 5333, 5, 0.63, 2.0',
|
|
'mgv7_np_ridge_uwater = 0, 1, (700, 700, 700), 85039, 5, 0.6, 2.0',
|
|
'mgv7_np_ridge = 0, 1, (100, 100, 100), 6467, 4, 0.75, 2.0',
|
|
'mg_biome_np_heat = 50, 50, (256, 256, 256), 5349, 3, 0.5, 2.0',
|
|
'mg_biome_np_humidity = 50, 50, (256, 256, 256), 842, 3, 0.5, 2.0',
|
|
]);
|
|
|
|
export function terrainSettings(newWorld) {
|
|
if (typeof newWorld !== 'boolean') throw new TypeError('newWorld must be a boolean.');
|
|
return newWorld ? [...NEW_WORLD] : [];
|
|
}
|
|
|
|
export function isTerrainSetting(line) {
|
|
return /^\s*(?:mg\w*|fixed_map_seed|water_level|mapgen_limit)\s*=/.test(line);
|
|
}
|