Fix Lint broken by b662a4577d692329b9ca83525e6039f2ddcd1ac1
[oweals/minetest.git] / src / environment.h
index 0cc3222f99f267d95caf0b1ea95e3daf8ed2460a..1de13e9eddae8628f79730a694650e4f78fbdeb1 100644 (file)
@@ -36,17 +36,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irr_v3d.h"
 #include "activeobject.h"
 #include "util/numeric.h"
-#include "mapnode.h"
-#include "mapblock.h"
 #include "threading/mutex.h"
 #include "threading/atomic.h"
 #include "network/networkprotocol.h" // for AccessDeniedCode
 
+class IGameDef;
+class Map;
+
 class Environment
 {
 public:
        // Environment will delete the map passed to the constructor
-       Environment();
+       Environment(IGameDef *gamedef);
        virtual ~Environment();
 
        /*
@@ -57,7 +58,7 @@ public:
        */
        virtual void step(f32 dtime) = 0;
 
-       virtual Map & getMap() = 0;
+       virtual Map &getMap() = 0;
 
        u32 getDayNightRatio();
 
@@ -77,6 +78,7 @@ public:
        // counter used internally when triggering ABMs
        u32 m_added_objects;
 
+       IGameDef *getGameDef() { return m_gamedef; }
 protected:
        GenericAtomic<float> m_time_of_day_speed;
 
@@ -114,6 +116,8 @@ protected:
        float m_cache_abm_interval;
        float m_cache_nodetimer_interval;
 
+       IGameDef *m_gamedef;
+
 private:
        Mutex m_time_lock;
 
@@ -121,4 +125,3 @@ private:
 };
 
 #endif
-