mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Stratum ore: Allow use with no noise for simple horizontal strata
If either of the 2 noise parameters are omitted the ore will occur from y_min to y_max in a simple horizontal stratum. As this does not compute noise performance improves, and is ideal for placing many layers. Clean up some nearby ore documentation.
This commit is contained in:
parent
9fa78b7387
commit
e2afcf85ce
4 changed files with 62 additions and 25 deletions
|
@ -1156,7 +1156,9 @@ int ModApiMapgen::l_register_ore(lua_State *L)
|
|||
OreStratum *orestratum = (OreStratum *)ore;
|
||||
|
||||
lua_getfield(L, index, "np_stratum_thickness");
|
||||
read_noiseparams(L, -1, &orestratum->np_stratum_thickness);
|
||||
// If thickness noise missing unset 'use noise' flag
|
||||
if (!read_noiseparams(L, -1, &orestratum->np_stratum_thickness))
|
||||
ore->flags &= ~OREFLAG_USE_NOISE;
|
||||
lua_pop(L, 1);
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue