mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Allow ObjDefManager instances to be cloned
This commit is contained in:
parent
d1c6cc72cc
commit
2062c80e21
13 changed files with 370 additions and 5 deletions
|
@ -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() {};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue