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:
@@ -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() {};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user