55#define MTSCHEM_FILE_SIGNATURE 0x4d54534d
56#define MTSCHEM_FILE_VER_HIGHEST_READ 4
57#define MTSCHEM_FILE_VER_HIGHEST_WRITE 4
58#define MTSCHEM_MAPNODE_SER_FMT_VER 28
60#define MTSCHEM_PROB_MASK 0x7F
62#define MTSCHEM_PROB_NEVER 0x00
63#define MTSCHEM_PROB_ALWAYS 0x7F
64#define MTSCHEM_PROB_ALWAYS_OLD 0xFF
66#define MTSCHEM_FORCE_PLACE 0x80
96 bool serializeToLua(std::ostream *os,
bool use_comments, u32 indent_spaces)
const;
103 std::vector<std::pair<v3s16, u8> > *plist,
104 std::vector<std::pair<s16, u8> > *splist);
124 virtual void clear();
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:540
Definition mg_schematic.h:117
SchematicManager()
Definition mg_schematic.h:137
static Schematic * create(SchematicType type)
Definition mg_schematic.h:131
const char * getObjectTitle() const
Definition mg_schematic.h:126
virtual void clear()
Definition mg_schematic.cpp:40
Server * m_server
Definition mg_schematic.h:139
SchematicManager * clone() const
Definition mg_schematic.cpp:31
virtual ~SchematicManager()=default
Definition mg_schematic.h:79
bool serializeToLua(std::ostream *os, bool use_comments, u32 indent_spaces) const
Definition mg_schematic.cpp:382
bool saveSchematicToFile(const std::string &filename, const NodeDefManager *ndef)
Definition mg_schematic.cpp:502
void condenseContentIds()
Definition mg_schematic.cpp:593
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2)
Definition mg_schematic.cpp:533
bool deserializeFromMts(std::istream *is)
Definition mg_schematic.cpp:269
std::vector< content_t > c_nodes
Definition mg_schematic.h:106
bool loadSchematicFromFile(const std::string &filename, const NodeDefManager *ndef, StringMap *replace_names=NULL)
Definition mg_schematic.cpp:472
ObjDef * clone() const
Definition mg_schematic.cpp:72
void applyProbabilities(v3s16 p0, std::vector< std::pair< v3s16, u8 > > *plist, std::vector< std::pair< s16, u8 > > *splist)
Definition mg_schematic.cpp:568
bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place)
Definition mg_schematic.cpp:194
u8 * slice_probs
Definition mg_schematic.h:110
MapNode * schemdata
Definition mg_schematic.h:109
void placeOnMap(ServerMap *map, v3s16 p, u32 flags, Rotation rot, bool force_place)
Definition mg_schematic.cpp:221
bool serializeToMts(std::ostream *os) const
Definition mg_schematic.cpp:354
virtual void resolveNodeNames()
Definition mg_schematic.cpp:92
virtual ~Schematic()
Definition mg_schematic.cpp:64
u32 flags
Definition mg_schematic.h:107
void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place)
Definition mg_schematic.cpp:111
v3s16 size
Definition mg_schematic.h:108
Definition servermap.h:44
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
Rotation
Definition mapnode.h:88
SchematicType
Definition mg_schematic.h:69
@ SCHEMATIC_NORMAL
Definition mg_schematic.h:70
SchematicFormatType
Definition mg_schematic.h:73
@ SCHEM_FMT_LUA
Definition mg_schematic.h:76
@ SCHEM_FMT_HANDLE
Definition mg_schematic.h:74
@ SCHEM_FMT_MTS
Definition mg_schematic.h:75
Definition activeobjectmgr.cpp:11
std::unordered_map< std::string, std::string > StringMap
Definition string.h:65
static std::string p(std::string path)
Definition test_filesys.cpp:53