]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/map.h
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
[dragonfireclient.git] / src / map.h
index 530d81e7a72a646df488bd6316a96f86976a81b9..2f8bfaebabc4cb19bba80af6964982de61b47ef5 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -20,9 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef MAP_HEADER
 #define MAP_HEADER
 
-#include <jmutex.h>
-#include <jmutexautolock.h>
-#include <jthread.h>
 #include <iostream>
 #include <sstream>
 #include <set>
@@ -33,7 +30,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "mapnode.h"
 #include "constants.h"
 #include "voxel.h"
-#include "mapgen.h" //for BlockMakeData and EmergeManager
 #include "modifiedstate.h"
 #include "util/container.h"
 #include "nodetimer.h"
@@ -50,7 +46,9 @@ class NodeMetadata;
 class IGameDef;
 class IRollbackReportSink;
 class EmergeManager;
+class ServerEnvironment;
 struct BlockMakeData;
+struct MapgenParams;
 
 
 /*
@@ -336,7 +334,11 @@ class Map /*: public NodeContainer*/
        void transforming_liquid_add(v3s16 p);
        s32 transforming_liquid_size();
 
+       virtual s16 getHeat(v3s16 p);
+       virtual s16 getHumidity(v3s16 p);
+
 protected:
+       friend class LuaVoxelManip;
 
        std::ostream &m_dout; // A bit deprecated, could be removed
 
@@ -482,6 +484,10 @@ class ServerMap : public Map
 
        // Parameters fed to the Mapgen
        MapgenParams *m_mgparams;
+
+       virtual s16 getHeat(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
+       virtual s16 getHumidity(ServerEnvironment *env, v3s16 p, MapBlock *block = NULL);
+
 private:
        // Seed used for all kinds of randomness in generation
        u64 m_seed;
@@ -554,7 +560,8 @@ class ManualMapVoxelManipulator : public MapVoxelManipulator
 
        virtual void emerge(VoxelArea a, s32 caller_id=-1);
 
-       void initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max);
+       void initialEmerge(v3s16 blockpos_min, v3s16 blockpos_max,
+                                               bool load_if_inexistent = true);
 
        // This is much faster with big chunks of generated data
        void blitBackAll(std::map<v3s16, MapBlock*> * modified_blocks);