summaryrefslogtreecommitdiff
path: root/src/mapgen/mg_schematic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen/mg_schematic.h')
-rw-r--r--src/mapgen/mg_schematic.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mapgen/mg_schematic.h b/src/mapgen/mg_schematic.h
index 6b31251b6..5f64ea280 100644
--- a/src/mapgen/mg_schematic.h
+++ b/src/mapgen/mg_schematic.h
@@ -92,7 +92,7 @@ enum SchematicFormatType {
class Schematic : public ObjDef, public NodeResolver {
public:
- Schematic();
+ Schematic() = default;
virtual ~Schematic();
ObjDef *clone() const;
@@ -105,11 +105,9 @@ public:
const NodeDefManager *ndef);
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2);
- bool deserializeFromMts(std::istream *is, std::vector<std::string> *names);
- bool serializeToMts(std::ostream *os,
- const std::vector<std::string> &names) const;
- bool serializeToLua(std::ostream *os, const std::vector<std::string> &names,
- bool use_comments, u32 indent_spaces) const;
+ bool deserializeFromMts(std::istream *is);
+ bool serializeToMts(std::ostream *os) const;
+ bool serializeToLua(std::ostream *os, bool use_comments, u32 indent_spaces) const;
void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place);
bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place);
@@ -124,6 +122,10 @@ public:
v3s16 size;
MapNode *schemdata = nullptr;
u8 *slice_probs = nullptr;
+
+private:
+ // Counterpart to the node resolver: Condense content_t to a sequential "m_nodenames" list
+ void condenseContentIds();
};
class SchematicManager : public ObjDefManager {
@@ -151,5 +153,3 @@ private:
Server *m_server;
};
-void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount,
- std::vector<std::string> *usednodes, const NodeDefManager *ndef);