Schematic decorations: Add 'place_offset_y' placement parameter
[oweals/minetest.git] / src / mg_decoration.h
index fd6e89e798bb94d43204ef139454f6c4b07ed479..01e063ca27bc976a18129718e5761948b6ea3bb6 100644 (file)
@@ -46,21 +46,6 @@ enum DecorationType {
 extern FlagDesc flagdesc_deco[];
 
 
-#if 0
-struct CutoffData {
-       VoxelArea a;
-       Decoration *deco;
-       //v3s16 p;
-       //v3s16 size;
-       //s16 height;
-
-       CutoffData(s16 x, s16 y, s16 z, s16 h) {
-               p = v3s16(x, y, z);
-               height = h;
-       }
-};
-#endif
-
 class Decoration : public ObjDef, public NodeResolver {
 public:
        Decoration() = default;
@@ -71,7 +56,6 @@ public:
        bool canPlaceDecoration(MMVManip *vm, v3s16 p);
        size_t placeDeco(Mapgen *mg, u32 blockseed,
                v3s16 nmin, v3s16 nmax, s16 deco_zero_level);
-       //size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
 
        virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p) = 0;
        virtual int getHeight() = 0;
@@ -90,6 +74,7 @@ public:
        std::unordered_set<u8> biomes;
 };
 
+
 class DecoSimple : public Decoration {
 public:
        virtual void resolveNodeNames();
@@ -102,6 +87,7 @@ public:
        u8 deco_param2;
 };
 
+
 class DecoSchematic : public Decoration {
 public:
        DecoSchematic() = default;
@@ -110,6 +96,7 @@ public:
        virtual int getHeight();
 
        Rotation rotation;
+       s16 place_offset_y = 0;
        Schematic *schematic = nullptr;
 };
 
@@ -121,6 +108,7 @@ public:
 };
 */
 
+
 class DecorationManager : public ObjDefManager {
 public:
        DecorationManager(IGameDef *gamedef);