70 #define MTSCHEM_FILE_SIGNATURE 0x4d54534d
71 #define MTSCHEM_FILE_VER_HIGHEST_READ 4
72 #define MTSCHEM_FILE_VER_HIGHEST_WRITE 4
74 #define MTSCHEM_PROB_MASK 0x7F
76 #define MTSCHEM_PROB_NEVER 0x00
77 #define MTSCHEM_PROB_ALWAYS 0x7F
78 #define MTSCHEM_PROB_ALWAYS_OLD 0xFF
80 #define MTSCHEM_FORCE_PLACE 0x80
110 const std::vector<std::string> &names)
const;
111 bool serializeToLua(std::ostream *os,
const std::vector<std::string> &names,
112 bool use_comments, u32 indent_spaces)
const;
119 std::vector<std::pair<v3s16, u8> > *plist,
120 std::vector<std::pair<s16, u8> > *splist);
136 virtual void clear();
This class is for getting the actual properties of nodes from their content ID.
Definition: nodedef.h:510
Definition: nodedef.h:792
Definition: mg_schematic.h:129
SchematicManager()
Definition: mg_schematic.h:149
static Schematic * create(SchematicType type)
Definition: mg_schematic.h:143
const char * getObjectTitle() const
Definition: mg_schematic.h:138
virtual void clear()
Definition: mg_schematic.cpp:55
Server * m_server
Definition: mg_schematic.h:149
SchematicManager * clone() const
Definition: mg_schematic.cpp:46
virtual ~SchematicManager()=default
Definition: mg_schematic.h:93
bool saveSchematicToFile(const std::string &filename, const NodeDefManager *ndef)
Definition: mg_schematic.cpp:494
bool deserializeFromMts(std::istream *is, std::vector< std::string > *names)
Definition: mg_schematic.cpp:282
bool getSchematicFromMap(Map *map, v3s16 p1, v3s16 p2)
Definition: mg_schematic.cpp:532
std::vector< content_t > c_nodes
Definition: mg_schematic.h:122
bool loadSchematicFromFile(const std::string &filename, const NodeDefManager *ndef, StringMap *replace_names=NULL)
Definition: mg_schematic.cpp:460
ObjDef * clone() const
Definition: mg_schematic.cpp:89
void applyProbabilities(v3s16 p0, std::vector< std::pair< v3s16, u8 > > *plist, std::vector< std::pair< s16, u8 > > *splist)
Definition: mg_schematic.cpp:563
bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place)
Definition: mg_schematic.cpp:205
bool serializeToMts(std::ostream *os, const std::vector< std::string > &names) const
Definition: mg_schematic.cpp:361
u8 * slice_probs
Definition: mg_schematic.h:126
MapNode * schemdata
Definition: mg_schematic.h:125
void placeOnMap(ServerMap *map, v3s16 p, u32 flags, Rotation rot, bool force_place)
Definition: mg_schematic.cpp:232
bool serializeToLua(std::ostream *os, const std::vector< std::string > &names, bool use_comments, u32 indent_spaces) const
Definition: mg_schematic.cpp:385
virtual void resolveNodeNames()
Definition: mg_schematic.cpp:109
virtual ~Schematic()
Definition: mg_schematic.cpp:83
u32 flags
Definition: mg_schematic.h:123
void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place)
Definition: mg_schematic.cpp:122
v3s16 size
Definition: mg_schematic.h:124
core::vector3d< s16 > v3s16
Definition: irr_v3d.h:28
Rotation
Definition: mapnode.h:82
SchematicType
Definition: mg_schematic.h:83
@ SCHEMATIC_NORMAL
Definition: mg_schematic.h:84
void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount, std::vector< std::string > *usednodes, const NodeDefManager *ndef)
Definition: mg_schematic.cpp:587
SchematicFormatType
Definition: mg_schematic.h:87
@ SCHEM_FMT_LUA
Definition: mg_schematic.h:90
@ SCHEM_FMT_HANDLE
Definition: mg_schematic.h:88
@ SCHEM_FMT_MTS
Definition: mg_schematic.h:89
Definition: activeobjectmgr.cpp:26
std::unordered_map< std::string, std::string > StringMap
Definition: string.h:60
Definition: mapnode.h:118
std::string p(std::string path)
Definition: test_filepath.cpp:59