mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-21 18:11:11 +00:00
Decoration: Add schematic rotation support
This commit is contained in:
parent
131eb56f52
commit
dd6d1afd8e
5 changed files with 113 additions and 45 deletions
12
src/mapgen.h
12
src/mapgen.h
|
@ -258,6 +258,14 @@ public:
|
|||
virtual std::string getName();
|
||||
};
|
||||
|
||||
enum Rotation {
|
||||
ROTATE_0,
|
||||
ROTATE_90,
|
||||
ROTATE_180,
|
||||
ROTATE_270,
|
||||
ROTATE_RAND,
|
||||
};
|
||||
|
||||
class DecoSchematic : public Decoration {
|
||||
public:
|
||||
std::string filename;
|
||||
|
@ -266,6 +274,7 @@ public:
|
|||
std::vector<content_t> c_nodes;
|
||||
|
||||
u32 flags;
|
||||
Rotation rotation;
|
||||
v3s16 size;
|
||||
MapNode *schematic;
|
||||
|
||||
|
@ -277,6 +286,9 @@ public:
|
|||
virtual int getHeight();
|
||||
virtual std::string getName();
|
||||
|
||||
void blitToVManip(v3s16 p, ManualMapVoxelManipulator *vm,
|
||||
int rot, bool force_placement);
|
||||
|
||||
bool loadSchematicFile();
|
||||
void saveSchematicFile(INodeDefManager *ndef);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue