]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/lua_api/l_vmanip.h
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
[dragonfireclient.git] / src / script / lua_api / l_vmanip.h
index 568f7104ed74df256eddd2b22e995606a0c5a7c1..d2f035a3ee107e022feba391e5b3a309284d8130 100644 (file)
@@ -20,36 +20,40 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef L_VMANIP_H_
 #define L_VMANIP_H_
 
-extern "C" {
-#include <lua.h>
-#include <lauxlib.h>
-}
-
+#include "lua_api/l_base.h"
 #include "irr_v3d.h"
-#include "map.h"
+#include <map>
+
+class Map;
+class MapBlock;
+class ManualMapVoxelManipulator;
 
 /*
   VoxelManip
  */
-class LuaVoxelManip
-{
+class LuaVoxelManip : public ModApiBase {
 private:
        ManualMapVoxelManipulator *vm;
        std::map<v3s16, MapBlock *> modified_blocks;
+       bool is_mapgen_vm;
 
        static const char className[];
        static const luaL_reg methods[];
 
        static int gc_object(lua_State *L);
 
-       static int l_read_chunk(lua_State *L);
-       static int l_write_chunk(lua_State *L);
+       static int l_read_from_map(lua_State *L);
+       static int l_get_data(lua_State *L);
+       static int l_set_data(lua_State *L);
+       static int l_write_to_map(lua_State *L);
+
        static int l_update_map(lua_State *L);
        static int l_update_liquids(lua_State *L);
        static int l_calc_lighting(lua_State *L);
        static int l_set_lighting(lua_State *L);
 
 public:
+       LuaVoxelManip(ManualMapVoxelManipulator *mmvm, bool is_mapgen_vm);
        LuaVoxelManip(Map *map);
        ~LuaVoxelManip();
 
@@ -62,4 +66,4 @@ class LuaVoxelManip
        static void Register(lua_State *L);
 };
 
-#endif // L_VMANIP_H_
+#endif /* L_VMANIP_H_ */