diff options
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_client.cpp | 2 | ||||
-rw-r--r-- | src/script/lua_api/l_env.cpp | 18 | ||||
-rw-r--r-- | src/script/lua_api/l_item.cpp | 8 | ||||
-rw-r--r-- | src/script/lua_api/l_mapgen.cpp | 20 | ||||
-rw-r--r-- | src/script/lua_api/l_vmanip.cpp | 8 |
5 files changed, 28 insertions, 28 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp index 230cbe7a2..2d36e977c 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -311,7 +311,7 @@ int ModApiClient::l_get_node_def(lua_State *L) IGameDef *gdef = getGameDef(L); assert(gdef); - INodeDefManager *ndef = gdef->ndef(); + const NodeDefManager *ndef = gdef->ndef(); assert(ndef); if (!lua_isstring(L, 1)) diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index 684885341..7ea8b64b5 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -263,7 +263,7 @@ int ModApiEnvMod::l_set_node(lua_State *L) { GET_ENV_PTR; - INodeDefManager *ndef = env->getGameDef()->ndef(); + const NodeDefManager *ndef = env->getGameDef()->ndef(); // parameters v3s16 pos = read_v3s16(L, 1); MapNode n = readnode(L, 2, ndef); @@ -279,7 +279,7 @@ int ModApiEnvMod::l_bulk_set_node(lua_State *L) { GET_ENV_PTR; - INodeDefManager *ndef = env->getGameDef()->ndef(); + const NodeDefManager *ndef = env->getGameDef()->ndef(); // parameters if (!lua_istable(L, 1)) { return 0; @@ -331,7 +331,7 @@ int ModApiEnvMod::l_swap_node(lua_State *L) { GET_ENV_PTR; - INodeDefManager *ndef = env->getGameDef()->ndef(); + const NodeDefManager *ndef = env->getGameDef()->ndef(); // parameters v3s16 pos = read_v3s16(L, 1); MapNode n = readnode(L, 2, ndef); @@ -394,7 +394,7 @@ int ModApiEnvMod::l_get_node_light(lua_State *L) bool is_position_ok; MapNode n = env->getMap().getNodeNoEx(pos, &is_position_ok); if (is_position_ok) { - INodeDefManager *ndef = env->getGameDef()->ndef(); + const NodeDefManager *ndef = env->getGameDef()->ndef(); lua_pushinteger(L, n.getLightBlend(dnr, ndef)); } else { lua_pushnil(L); @@ -410,7 +410,7 @@ int ModApiEnvMod::l_place_node(lua_State *L) ScriptApiItem *scriptIfaceItem = getScriptApi<ScriptApiItem>(L); Server *server = getServer(L); - INodeDefManager *ndef = server->ndef(); + const NodeDefManager *ndef = server->ndef(); IItemDefManager *idef = server->idef(); v3s16 pos = read_v3s16(L, 1); @@ -748,7 +748,7 @@ int ModApiEnvMod::l_find_node_near(lua_State *L) return 0; } - INodeDefManager *ndef = getGameDef(L)->ndef(); + const NodeDefManager *ndef = getGameDef(L)->ndef(); v3s16 pos = read_v3s16(L, 1); int radius = luaL_checkinteger(L, 2); std::vector<content_t> filter; @@ -795,7 +795,7 @@ int ModApiEnvMod::l_find_nodes_in_area(lua_State *L) { GET_ENV_PTR; - INodeDefManager *ndef = getServer(L)->ndef(); + const NodeDefManager *ndef = getServer(L)->ndef(); v3s16 minp = read_v3s16(L, 1); v3s16 maxp = read_v3s16(L, 2); sortBoxVerticies(minp, maxp); @@ -867,7 +867,7 @@ int ModApiEnvMod::l_find_nodes_in_area_under_air(lua_State *L) GET_ENV_PTR; - INodeDefManager *ndef = getServer(L)->ndef(); + const NodeDefManager *ndef = getServer(L)->ndef(); v3s16 minp = read_v3s16(L, 1); v3s16 maxp = read_v3s16(L, 2); sortBoxVerticies(minp, maxp); @@ -1182,7 +1182,7 @@ int ModApiEnvMod::l_spawn_tree(lua_State *L) treegen::TreeDef tree_def; std::string trunk,leaves,fruit; - INodeDefManager *ndef = env->getGameDef()->ndef(); + const NodeDefManager *ndef = env->getGameDef()->ndef(); if(lua_istable(L, 2)) { diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index 207a04c6c..d7e9f0a5b 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -501,7 +501,7 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) // Get the writable item and node definition managers from the server IWritableItemDefManager *idef = getServer(L)->getWritableItemDefManager(); - IWritableNodeDefManager *ndef = + NodeDefManager *ndef = getServer(L)->getWritableNodeDefManager(); // Check if name is defined @@ -561,7 +561,7 @@ int ModApiItemMod::l_unregister_item_raw(lua_State *L) // Unregister the node if (idef->get(name).type == ITEM_NODE) { - IWritableNodeDefManager *ndef = + NodeDefManager *ndef = getServer(L)->getWritableNodeDefManager(); ndef->removeNode(name); } @@ -593,7 +593,7 @@ int ModApiItemMod::l_get_content_id(lua_State *L) NO_MAP_LOCK_REQUIRED; std::string name = luaL_checkstring(L, 1); - INodeDefManager *ndef = getGameDef(L)->getNodeDefManager(); + const NodeDefManager *ndef = getGameDef(L)->getNodeDefManager(); content_t c = ndef->getId(name); lua_pushinteger(L, c); @@ -606,7 +606,7 @@ int ModApiItemMod::l_get_name_from_content_id(lua_State *L) NO_MAP_LOCK_REQUIRED; content_t c = luaL_checkint(L, 1); - INodeDefManager *ndef = getGameDef(L)->getNodeDefManager(); + const NodeDefManager *ndef = getGameDef(L)->getNodeDefManager(); const char *name = ndef->get(c).name.c_str(); lua_pushstring(L, name); diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp index db517b942..775f4a76d 100644 --- a/src/script/lua_api/l_mapgen.cpp +++ b/src/script/lua_api/l_mapgen.cpp @@ -99,16 +99,16 @@ ObjDef *get_objdef(lua_State *L, int index, ObjDefManager *objmgr); Biome *get_or_load_biome(lua_State *L, int index, BiomeManager *biomemgr); -Biome *read_biome_def(lua_State *L, int index, INodeDefManager *ndef); +Biome *read_biome_def(lua_State *L, int index, const NodeDefManager *ndef); size_t get_biome_list(lua_State *L, int index, BiomeManager *biomemgr, std::unordered_set<u8> *biome_id_list); Schematic *get_or_load_schematic(lua_State *L, int index, SchematicManager *schemmgr, StringMap *replace_names); -Schematic *load_schematic(lua_State *L, int index, INodeDefManager *ndef, +Schematic *load_schematic(lua_State *L, int index, const NodeDefManager *ndef, StringMap *replace_names); Schematic *load_schematic_from_def(lua_State *L, int index, - INodeDefManager *ndef, StringMap *replace_names); + const NodeDefManager *ndef, StringMap *replace_names); bool read_schematic_def(lua_State *L, int index, Schematic *schem, std::vector<std::string> *names); @@ -160,7 +160,7 @@ Schematic *get_or_load_schematic(lua_State *L, int index, } -Schematic *load_schematic(lua_State *L, int index, INodeDefManager *ndef, +Schematic *load_schematic(lua_State *L, int index, const NodeDefManager *ndef, StringMap *replace_names) { if (index < 0) @@ -196,7 +196,7 @@ Schematic *load_schematic(lua_State *L, int index, INodeDefManager *ndef, Schematic *load_schematic_from_def(lua_State *L, int index, - INodeDefManager *ndef, StringMap *replace_names) + const NodeDefManager *ndef, StringMap *replace_names) { Schematic *schem = SchematicManager::create(SCHEMATIC_NORMAL); @@ -374,7 +374,7 @@ Biome *get_or_load_biome(lua_State *L, int index, BiomeManager *biomemgr) } -Biome *read_biome_def(lua_State *L, int index, INodeDefManager *ndef) +Biome *read_biome_def(lua_State *L, int index, const NodeDefManager *ndef) { if (!lua_istable(L, index)) return NULL; @@ -1014,7 +1014,7 @@ int ModApiMapgen::l_register_biome(lua_State *L) int index = 1; luaL_checktype(L, index, LUA_TTABLE); - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); BiomeManager *bmgr = getServer(L)->getEmergeManager()->biomemgr; Biome *biome = read_biome_def(L, index, ndef); @@ -1040,7 +1040,7 @@ int ModApiMapgen::l_register_decoration(lua_State *L) int index = 1; luaL_checktype(L, index, LUA_TTABLE); - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); DecorationManager *decomgr = getServer(L)->getEmergeManager()->decomgr; BiomeManager *biomemgr = getServer(L)->getEmergeManager()->biomemgr; SchematicManager *schemmgr = getServer(L)->getEmergeManager()->schemmgr; @@ -1197,7 +1197,7 @@ int ModApiMapgen::l_register_ore(lua_State *L) int index = 1; luaL_checktype(L, index, LUA_TTABLE); - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); BiomeManager *bmgr = getServer(L)->getEmergeManager()->biomemgr; OreManager *oremgr = getServer(L)->getEmergeManager()->oremgr; @@ -1469,7 +1469,7 @@ int ModApiMapgen::l_create_schematic(lua_State *L) { MAP_LOCK_REQUIRED; - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); const char *filename = luaL_checkstring(L, 4); CHECK_SECURE_PATH(L, filename, true); diff --git a/src/script/lua_api/l_vmanip.cpp b/src/script/lua_api/l_vmanip.cpp index ca837b655..f6239339c 100644 --- a/src/script/lua_api/l_vmanip.cpp +++ b/src/script/lua_api/l_vmanip.cpp @@ -136,7 +136,7 @@ int LuaVoxelManip::l_get_node_at(lua_State *L) { NO_MAP_LOCK_REQUIRED; - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); LuaVoxelManip *o = checkobject(L, 1); v3s16 pos = check_v3s16(L, 2); @@ -149,7 +149,7 @@ int LuaVoxelManip::l_set_node_at(lua_State *L) { NO_MAP_LOCK_REQUIRED; - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); LuaVoxelManip *o = checkobject(L, 1); v3s16 pos = check_v3s16(L, 2); @@ -167,7 +167,7 @@ int LuaVoxelManip::l_update_liquids(lua_State *L) LuaVoxelManip *o = checkobject(L, 1); Map *map = &(env->getMap()); - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); MMVManip *vm = o->vm; Mapgen mg; @@ -188,7 +188,7 @@ int LuaVoxelManip::l_calc_lighting(lua_State *L) if (!o->is_mapgen_vm) return 0; - INodeDefManager *ndef = getServer(L)->getNodeDefManager(); + const NodeDefManager *ndef = getServer(L)->getNodeDefManager(); EmergeManager *emerge = getServer(L)->getEmergeManager(); MMVManip *vm = o->vm; |