diff options
author | paramat <mat.gregory@virginmedia.com> | 2016-09-11 23:34:43 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2016-09-14 09:19:54 +0100 |
commit | b88595050f3af5ccac06aac331ead4ebdcb9deb9 (patch) | |
tree | 378906d675cd1c87637646f8ea4f084202d514a9 /src/mg_decoration.h | |
parent | b77cee146b0029d377f1028b942857d062bc1374 (diff) | |
download | minetest-b88595050f3af5ccac06aac331ead4ebdcb9deb9.tar.gz minetest-b88595050f3af5ccac06aac331ead4ebdcb9deb9.tar.bz2 minetest-b88595050f3af5ccac06aac331ead4ebdcb9deb9.zip |
Decorations: Generalise 'spawn by' to be used by all decoration types
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
Diffstat (limited to 'src/mg_decoration.h')
-rw-r--r-- | src/mg_decoration.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mg_decoration.h b/src/mg_decoration.h index da98fd482..be0ba44d7 100644 --- a/src/mg_decoration.h +++ b/src/mg_decoration.h @@ -68,6 +68,7 @@ public: virtual void resolveNodeNames(); + bool canPlaceDecoration(MMVManip *vm, v3s16 p); size_t placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); //size_t placeCutoffs(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax); @@ -82,6 +83,8 @@ public: s16 y_max; float fill_ratio; NoiseParams np; + std::vector<content_t> c_spawnby; + s16 nspawnby; UNORDERED_SET<u8> biomes; //std::list<CutoffData> cutoffs; @@ -90,17 +93,13 @@ public: class DecoSimple : public Decoration { public: + virtual void resolveNodeNames(); virtual size_t generate(MMVManip *vm, PcgRandom *pr, v3s16 p); - bool canPlaceDecoration(MMVManip *vm, v3s16 p); virtual int getHeight(); - virtual void resolveNodeNames(); - std::vector<content_t> c_decos; - std::vector<content_t> c_spawnby; s16 deco_height; s16 deco_height_max; - s16 nspawnby; }; class DecoSchematic : public Decoration { |