1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Refactor decoration-related code

Split up ModApiMapgen::l_register_decoration()
Define and make use of CONTAINS() and ARRLEN() macros
This commit is contained in:
kwolekr 2014-10-29 01:54:11 -04:00
parent 7c6da2f384
commit 1cb6ea6346
7 changed files with 158 additions and 142 deletions

View file

@ -22,6 +22,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_base.h"
class NodeResolver;
class DecoSimple;
class DecoSchematic;
class ModApiMapgen : public ModApiBase {
private:
// get_mapgen_object(objectname)
@ -53,6 +57,11 @@ private:
// place_schematic(p, schematic, rotation, replacement)
static int l_place_schematic(lua_State *L);
static bool regDecoSimple(lua_State *L,
NodeResolver *resolver, DecoSimple *deco);
static bool regDecoSchematic(lua_State *L,
NodeResolver *resolver, DecoSchematic *deco);
static struct EnumString es_BiomeTerrainType[];
static struct EnumString es_DecorationType[];
static struct EnumString es_MapgenObject[];