52#define MTSCHEM_FILE_SIGNATURE 0x4d54534d
53#define MTSCHEM_FILE_VER_HIGHEST_READ 4
54#define MTSCHEM_FILE_VER_HIGHEST_WRITE 4
55#define MTSCHEM_MAPNODE_SER_FMT_VER 28
57#define MTSCHEM_PROB_MASK 0x7F
59#define MTSCHEM_PROB_NEVER 0x00
60#define MTSCHEM_PROB_ALWAYS 0x7F
61#define MTSCHEM_PROB_ALWAYS_OLD 0xFF
63#define MTSCHEM_FORCE_PLACE 0x80
93 bool serializeToLua(std::ostream *os,
bool use_comments, u32 indent_spaces)
const;
100 std::vector<std::pair<v3s16, u8> > *plist,
101 std::vector<std::pair<s16, u8> > *splist);
121 virtual void clear();
This class is for getting the actual properties of nodes from their content ID.
Definition nodedef.h:509
Definition mg_schematic.h:114
SchematicManager()
Definition mg_schematic.h:134
static Schematic * create(SchematicType type)
Definition mg_schematic.h:128
const char * getObjectTitle() const
Definition mg_schematic.h:123
virtual void clear()
Definition mg_schematic.cpp:41
Server * m_server
Definition mg_schematic.h:136
SchematicManager * clone() const
Definition mg_schematic.cpp:32
virtual ~SchematicManager()=default
Definition mg_schematic.h:76
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:103
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:73
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:195
u8 * slice_probs
Definition mg_schematic.h:107
MapNode * schemdata
Definition mg_schematic.h:106
void placeOnMap(ServerMap *map, v3s16 p, u32 flags, Rotation rot, bool force_place)
Definition mg_schematic.cpp:222
bool serializeToMts(std::ostream *os) const
Definition mg_schematic.cpp:354
virtual void resolveNodeNames()
Definition mg_schematic.cpp:93
virtual ~Schematic()
Definition mg_schematic.cpp:65
u32 flags
Definition mg_schematic.h:104
void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place)
Definition mg_schematic.cpp:112
v3s16 size
Definition mg_schematic.h:105
Definition servermap.h:43
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
Rotation
Definition mapnode.h:87
SchematicType
Definition mg_schematic.h:66
@ SCHEMATIC_NORMAL
Definition mg_schematic.h:67
SchematicFormatType
Definition mg_schematic.h:70
@ SCHEM_FMT_LUA
Definition mg_schematic.h:73
@ SCHEM_FMT_HANDLE
Definition mg_schematic.h:71
@ SCHEM_FMT_MTS
Definition mg_schematic.h:72
Definition activeobjectmgr.cpp:11
std::unordered_map< std::string, std::string > StringMap
Definition string.h:66
static std::string p(std::string path)
Definition test_filesys.cpp:64