Lua export omits position limts if not needed
This commit is contained in:
parent
b7423c152b
commit
17c7df54da
@ -2288,8 +2288,13 @@ inputExportLua.onclick = function() {
|
||||
str += ` name = \"${escapedName}\",\n`;
|
||||
str += ` heat_point = ${biome.heat},\n`;
|
||||
str += ` humidity_point = ${biome.humidity},\n`;
|
||||
str += ` min_pos { x = ${biome.min_x}, y = ${biome.min_y}, z = ${biome.min_z} },\n`;
|
||||
if (biome.min_x !== MIN_X || biome.max_x !== MAX_X || biome.min_z !== MIN_Z || biome.max_z !== MAX_Z) {
|
||||
str += ` max_pos { x = ${biome.max_x}, y = ${biome.max_y}, z = ${biome.max_z} },\n`;
|
||||
str += ` min_pos { x = ${biome.min_x}, y = ${biome.min_y}, z = ${biome.min_z} },\n`;
|
||||
} else if (biome.min_y !== MIN_Y || biome.max_y !== MAX_Y) {
|
||||
str += ` max_y = ${biome.max_y},\n`;
|
||||
str += ` min_y = ${biome.min_y},\n`;
|
||||
}
|
||||
str += "})\n";
|
||||
}
|
||||
exportSectionText.innerText = str;
|
||||
|
@ -124,7 +124,7 @@
|
||||
|
||||
<p>This allows you to export the current biomes into a text. You can choose to export them in one of various formats. Only biome information is included, not the display settings or noise parameters.</p>
|
||||
|
||||
<p>The <b>Lua</b> export gives you a very basic Lua code that can be pasted into an actual Lua mod. The code is very basic and does not include the “landscape materials”, like what the surface is made of (dirt, stone, sand, etc.).</p>
|
||||
<p>The <b>Lua</b> export gives you a very basic Lua code that can be pasted into an actual Lua mod. The code is very basic and does not include the “landscape materials”, like what the surface is made of (dirt, stone, sand, etc.). Biome coordinate limits (`y_min`/`y_max` or `min_pos`/`max_pos`) are added to the export only if they differ from the default values -31000 and 31000.</p>
|
||||
|
||||
<p>The <b>JSON</b> export is a text you can use to import the biomes in LiBPoV later. You may want to copy this into a text file.</p>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user