mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of the associated NodeDefManager. In addition to minimizing unnecessary abstraction and overhead, this move permits NodeResolvers to look up nodes that they had previously set pending for resolution. So far, this functionality has been used in the case of schematics for serialization/deserialization.
This commit is contained in:
@@ -22,12 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include "lua_api/l_base.h"
|
||||
|
||||
class INodeDefManager;
|
||||
struct NodeResolveInfo;
|
||||
class DecoSimple;
|
||||
class DecoSchematic;
|
||||
class SchematicManager;
|
||||
|
||||
class ModApiMapgen : public ModApiBase {
|
||||
private:
|
||||
// get_mapgen_object(objectname)
|
||||
@@ -84,7 +78,7 @@ private:
|
||||
// place_schematic(p, schematic, rotation, replacement)
|
||||
static int l_place_schematic(lua_State *L);
|
||||
|
||||
// serialize_schematic(schematic, format, use_comments)
|
||||
// serialize_schematic(schematic, format, options={...})
|
||||
static int l_serialize_schematic(lua_State *L);
|
||||
|
||||
public:
|
||||
@@ -96,6 +90,7 @@ public:
|
||||
static struct EnumString es_OreType[];
|
||||
static struct EnumString es_Rotation[];
|
||||
static struct EnumString es_SchematicFormatType[];
|
||||
static struct EnumString es_NodeResolveMethod[];
|
||||
};
|
||||
|
||||
#endif /* L_MAPGEN_H_ */
|
||||
|
Reference in New Issue
Block a user