1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-31 23:45:22 +01:00

Allow ObjDefManager instances to be cloned

This commit is contained in:
sfan5
2020-04-09 23:40:12 +02:00
committed by Loïc Blot
parent d1c6cc72cc
commit 2062c80e21
13 changed files with 370 additions and 5 deletions

View File

@@ -73,11 +73,16 @@ public:
s16 place_offset_y = 0;
std::unordered_set<u8> biomes;
protected:
void cloneTo(Decoration *def) const;
};
class DecoSimple : public Decoration {
public:
ObjDef *clone() const;
virtual void resolveNodeNames();
virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p, bool ceiling);
@@ -91,6 +96,8 @@ public:
class DecoSchematic : public Decoration {
public:
ObjDef *clone() const;
DecoSchematic() = default;
virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p, bool ceiling);
@@ -113,6 +120,8 @@ public:
DecorationManager(IGameDef *gamedef);
virtual ~DecorationManager() = default;
DecorationManager *clone() const;
const char *getObjectTitle() const
{
return "decoration";
@@ -133,4 +142,7 @@ public:
}
size_t placeAllDecos(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
private:
DecorationManager() {};
};