mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove get_noiseparams function. read_noiseparams should be used from now on
This commit is contained in:
parent
fb2bc956b1
commit
cfba55ba0a
7 changed files with 21 additions and 26 deletions
|
@ -394,9 +394,12 @@ int ModApiMapgen::l_register_decoration(lua_State *L)
|
|||
for (size_t i = 0; i != place_on_names.size(); i++)
|
||||
resolver->addNodeList(place_on_names[i], &deco->c_place_on);
|
||||
|
||||
getflagsfield(L, index, "flags", flagdesc_deco, &deco->flags, NULL);
|
||||
|
||||
//// Get NoiseParams to define how decoration is placed
|
||||
lua_getfield(L, index, "noise_params");
|
||||
deco->np = get_noiseparams(L, -1);
|
||||
if (read_noiseparams(L, -1, &deco->np))
|
||||
deco->flags |= DECO_USE_NOISE;
|
||||
lua_pop(L, 1);
|
||||
|
||||
//// Get biomes associated with this decoration (if any)
|
||||
|
@ -482,9 +485,6 @@ bool ModApiMapgen::regDecoSchematic(lua_State *L, INodeDefManager *ndef,
|
|||
{
|
||||
int index = 1;
|
||||
|
||||
deco->flags = 0;
|
||||
getflagsfield(L, index, "flags", flagdesc_deco_schematic, &deco->flags, NULL);
|
||||
|
||||
deco->rotation = (Rotation)getenumfield(L, index, "rotation",
|
||||
es_Rotation, ROTATE_0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue