mirror of
https://github.com/minetest/minetest.git
synced 2025-07-05 01:10:22 +02:00
Ores: Add stratum ore (#6352)
Creates a single undulating ore stratum that is continuous across mapchunk borders and horizontally spans the world. Due to being continuous is ideal for creating bands of alternative stone type running through cliffs and mountains, or underground layers. Add missing documentation of 'ore_param2' parameter.
This commit is contained in:
@ -73,6 +73,7 @@ struct EnumString ModApiMapgen::es_OreType[] =
|
||||
{ORE_PUFF, "puff"},
|
||||
{ORE_BLOB, "blob"},
|
||||
{ORE_VEIN, "vein"},
|
||||
{ORE_STRATUM, "stratum"},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
@ -1149,6 +1150,15 @@ int ModApiMapgen::l_register_ore(lua_State *L)
|
||||
|
||||
break;
|
||||
}
|
||||
case ORE_STRATUM: {
|
||||
OreStratum *orestratum = (OreStratum *)ore;
|
||||
|
||||
lua_getfield(L, index, "np_stratum_thickness");
|
||||
read_noiseparams(L, -1, &orestratum->np_stratum_thickness);
|
||||
lua_pop(L, 1);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user