script: Replace calls to depreated luaL_openlib

master
sfan5 2021-05-25 20:20:16 +02:00
parent a12017c564
commit a0047d6edc
17 changed files with 22 additions and 22 deletions

View File

@ -372,7 +372,7 @@ void LuaAreaStore::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (AreaStore())

View File

@ -219,7 +219,7 @@ void LuaCamera::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
}

View File

@ -228,7 +228,7 @@ void LuaRaycast::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);

View File

@ -456,7 +456,7 @@ void InvRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

View File

@ -483,7 +483,7 @@ void LuaItemStack::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (ItemStack(itemstack or itemstring or table or nil))

View File

@ -114,7 +114,7 @@ void ItemStackMetaRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

View File

@ -446,7 +446,7 @@ void LuaLocalPlayer::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // Drop methodtable
}

View File

@ -211,7 +211,7 @@ void LuaMinimap::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

View File

@ -107,7 +107,7 @@ void ModChannelRef::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // Drop methodtable
}

View File

@ -234,7 +234,7 @@ void NodeMetaRef::RegisterCommon(lua_State *L)
void NodeMetaRef::Register(lua_State *L)
{
RegisterCommon(L);
luaL_openlib(L, 0, methodsServer, 0); // fill methodtable
luaL_register(L, nullptr, methodsServer); // fill methodtable
lua_pop(L, 1); // drop methodtable
}
@ -260,7 +260,7 @@ const luaL_Reg NodeMetaRef::methodsServer[] = {
void NodeMetaRef::RegisterClient(lua_State *L)
{
RegisterCommon(L);
luaL_openlib(L, 0, methodsClient, 0); // fill methodtable
luaL_register(L, nullptr, methodsClient); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

View File

@ -122,7 +122,7 @@ void NodeTimerRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua

View File

@ -122,7 +122,7 @@ void LuaPerlinNoise::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@ -380,7 +380,7 @@ void LuaPerlinNoiseMap::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@ -485,7 +485,7 @@ void LuaPseudoRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@ -584,7 +584,7 @@ void LuaPcgRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);
@ -699,7 +699,7 @@ void LuaSecureRandom::Register(lua_State *L)
lua_pop(L, 1);
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
lua_register(L, className, create_object);

View File

@ -2311,7 +2311,7 @@ void ObjectRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

View File

@ -97,7 +97,7 @@ void PlayerMetaRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0);
luaL_register(L, nullptr, methods);
lua_pop(L, 1);
// Cannot be created from Lua

View File

@ -334,7 +334,7 @@ void LuaSettings::Register(lua_State* L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (Settings(filename))

View File

@ -110,7 +110,7 @@ void StorageRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
}

View File

@ -450,7 +450,7 @@ void LuaVoxelManip::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
luaL_openlib(L, 0, methods, 0); // fill methodtable
luaL_register(L, nullptr, methods); // fill methodtable
lua_pop(L, 1); // drop methodtable
// Can be created from Lua (VoxelManip())