diff options
Diffstat (limited to 'src/mg_schematic.h')
-rw-r--r-- | src/mg_schematic.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mg_schematic.h b/src/mg_schematic.h index ad5afb15f..4a85f69a6 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, public NodeResolver { +class Schematic : public ObjDef, public NodeResolver { public: std::vector<content_t> c_nodes; @@ -62,7 +62,7 @@ public: Rotation rot, bool force_placement, INodeDefManager *ndef); bool loadSchematicFromFile(const char *filename, INodeDefManager *ndef, - std::map<std::string, std::string> &replace_names); + StringMap *replace_names); void saveSchematicToFile(const char *filename, INodeDefManager *ndef); bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2); @@ -73,14 +73,16 @@ public: std::vector<std::pair<s16, u8> > *splist); }; -class SchematicManager : public GenElementManager { +class SchematicManager : public ObjDefManager { public: - static const char *ELEMENT_TITLE; - static const size_t ELEMENT_LIMIT = 0x10000; - SchematicManager(IGameDef *gamedef); ~SchematicManager() {} + const char *getObjectTitle() const + { + return "schematic"; + } + Schematic *create(int type) { return new Schematic; |