aboutsummaryrefslogtreecommitdiff
path: root/src/mg_schematic.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-17 03:20:17 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-27 02:12:21 -0500
commitb67f37f27ea7d89b2098fa9fcc2533fa1091e695 (patch)
treeb97d7c98fc29677dfc57fa8f8af4332ff9d0c87c /src/mg_schematic.h
parent3ea5ed4ffe600fa11a3deb3de58d5bd5bbb65ee1 (diff)
downloadminetest-b67f37f27ea7d89b2098fa9fcc2533fa1091e695.tar.gz
minetest-b67f37f27ea7d89b2098fa9fcc2533fa1091e695.tar.bz2
minetest-b67f37f27ea7d89b2098fa9fcc2533fa1091e695.zip
Redefine NodeResolver interface and replace with callback mechanism
Diffstat (limited to 'src/mg_schematic.h')
-rw-r--r--src/mg_schematic.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mg_schematic.h b/src/mg_schematic.h
index df54d79ba..8d0b18148 100644
--- a/src/mg_schematic.h
+++ b/src/mg_schematic.h
@@ -42,7 +42,7 @@ class NodeResolver;
#define MTSCHEM_PROB_ALWAYS 0xFF
-class Schematic : public GenElement {
+class Schematic : public GenElement, public NodeResolver {
public:
std::vector<content_t> c_nodes;
@@ -52,14 +52,16 @@ public:
u8 *slice_probs;
Schematic();
- ~Schematic();
+ virtual ~Schematic();
+
+ virtual void resolveNodeNames(NodeResolveInfo *nri);
void updateContentIds();
void blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm,
Rotation rot, bool force_placement, INodeDefManager *ndef);
- bool loadSchematicFromFile(const char *filename, NodeResolver *resolver,
+ bool loadSchematicFromFile(const char *filename, INodeDefManager *ndef,
std::map<std::string, std::string> &replace_names);
void saveSchematicToFile(const char *filename, INodeDefManager *ndef);
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
@@ -86,7 +88,7 @@ public:
};
void build_nnlist_and_update_ids(MapNode *nodes, u32 nodecount,
- std::vector<content_t> *usednodes);
+ std::vector<content_t> *usednodes);
#endif