script: Replace calls to depreated luaL_openlib

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

@ -372,7 +372,7 @@ void LuaAreaStore::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Can be created from Lua (AreaStore()) // Can be created from Lua (AreaStore())

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

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

@ -456,7 +456,7 @@ void InvRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua // Cannot be created from Lua

@ -483,7 +483,7 @@ void LuaItemStack::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Can be created from Lua (ItemStack(itemstack or itemstring or table or nil)) // Can be created from Lua (ItemStack(itemstack or itemstring or table or nil))

@ -114,7 +114,7 @@ void ItemStackMetaRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua // Cannot be created from Lua

@ -446,7 +446,7 @@ void LuaLocalPlayer::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable 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 lua_pop(L, 1); // Drop methodtable
} }

@ -211,7 +211,7 @@ void LuaMinimap::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
} }

@ -107,7 +107,7 @@ void ModChannelRef::Register(lua_State *L)
lua_pop(L, 1); // Drop metatable 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 lua_pop(L, 1); // Drop methodtable
} }

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

@ -122,7 +122,7 @@ void NodeTimerRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Cannot be created from Lua // Cannot be created from Lua

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

@ -2311,7 +2311,7 @@ void ObjectRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
} }

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

@ -334,7 +334,7 @@ void LuaSettings::Register(lua_State* L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Can be created from Lua (Settings(filename)) // Can be created from Lua (Settings(filename))

@ -110,7 +110,7 @@ void StorageRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
} }

@ -450,7 +450,7 @@ void LuaVoxelManip::Register(lua_State *L)
lua_pop(L, 1); // drop metatable 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 lua_pop(L, 1); // drop methodtable
// Can be created from Lua (VoxelManip()) // Can be created from Lua (VoxelManip())