1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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:
Paramat 2017-09-03 21:32:21 +01:00 committed by Loïc Blot
parent 5bef339388
commit 9f6d90aa81
4 changed files with 105 additions and 1 deletions

View file

@ -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;
}