mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add L-system trees as decorations (#14355)
This commit is contained in:
parent
f07e1026ac
commit
60810c2d37
10 changed files with 125 additions and 46 deletions
|
@ -31,6 +31,7 @@ class Mapgen;
|
|||
class MMVManip;
|
||||
class PcgRandom;
|
||||
class Schematic;
|
||||
namespace treegen { struct TreeDef; }
|
||||
|
||||
enum DecorationType {
|
||||
DECO_SIMPLE,
|
||||
|
@ -112,12 +113,15 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
class DecoLSystem : public Decoration {
|
||||
public:
|
||||
virtual void generate(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax);
|
||||
ObjDef *clone() const;
|
||||
|
||||
virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p, bool ceiling);
|
||||
|
||||
// In case it gets cloned it uses the same tree def.
|
||||
std::shared_ptr<treegen::TreeDef> tree_def;
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
class DecorationManager : public ObjDefManager {
|
||||
|
@ -139,8 +143,8 @@ public:
|
|||
return new DecoSimple;
|
||||
case DECO_SCHEMATIC:
|
||||
return new DecoSchematic;
|
||||
//case DECO_LSYSTEM:
|
||||
// return new DecoLSystem;
|
||||
case DECO_LSYSTEM:
|
||||
return new DecoLSystem;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue