LuaVoxelManip: Add option to allocate blank data
[oweals/minetest.git] / src / mapgen.h
index 5feeaf97cb9b56a25101b9c9bf96c5362d91acd8..07202f9a227cca2f7d2dd42d66e484383fe6656c 100644 (file)
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef MAPGEN_HEADER
 #define MAPGEN_HEADER
 
+#include "noise.h"
 #include "nodedef.h"
 #include "mapnode.h"
 #include "util/string.h"
@@ -107,6 +108,9 @@ struct MapgenParams {
        s16 water_level;
        u32 flags;
 
+       NoiseParams np_biome_heat;
+       NoiseParams np_biome_humidity;
+
        MapgenSpecificParams *sparams;
 
        MapgenParams()
@@ -117,6 +121,8 @@ struct MapgenParams {
                chunksize   = 5;
                flags       = MG_TREES | MG_CAVES | MG_LIGHT;
                sparams     = NULL;
+               np_biome_heat     = NoiseParams(50, 50, v3f(500.0, 500.0, 500.0), 5349, 3, 0.5, 2.0);
+               np_biome_humidity = NoiseParams(50, 50, v3f(500.0, 500.0, 500.0), 842, 3, 0.5, 2.0);
        }
 };
 
@@ -172,7 +178,7 @@ public:
        static const char *ELEMENT_TITLE;
        static const size_t ELEMENT_LIMIT = -1;
 
-       GenElementManager() {}
+       GenElementManager(IGameDef *gamedef);
        virtual ~GenElementManager();
 
        virtual GenElement *create(int type) = 0;
@@ -186,6 +192,7 @@ public:
        virtual GenElement *getByName(const std::string &name);
 
 protected:
+       INodeDefManager *m_ndef;
        std::vector<GenElement *> m_elements;
 };