mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-29 18:53:44 +01:00
Remove most global localization from init.lua
This commit is contained in:
parent
adc429cf9d
commit
cedfe1387b
4
init.lua
4
init.lua
@ -1,6 +1,3 @@
|
|||||||
-- Localize globals
|
|
||||||
local _G, _VERSION, assert, debug, dump, error, load, loadfile, minetest, pairs, rawget, rawset, setmetatable, table = _G, _VERSION, assert, debug, dump, error, load, loadfile, minetest, pairs, rawget, rawset, setmetatable, table
|
|
||||||
|
|
||||||
-- Lua version check
|
-- Lua version check
|
||||||
if _VERSION then
|
if _VERSION then
|
||||||
if _VERSION < "Lua 5" then
|
if _VERSION < "Lua 5" then
|
||||||
@ -86,6 +83,7 @@ local function get_resource(modname, resource, ...)
|
|||||||
return table.concat({minetest.get_modpath(modname), resource, ...}, modlib.dir_delim)
|
return table.concat({minetest.get_modpath(modname), resource, ...}, modlib.dir_delim)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local rawget, rawset = rawget, rawset
|
||||||
modlib = setmetatable({
|
modlib = setmetatable({
|
||||||
-- TODO bump on release
|
-- TODO bump on release
|
||||||
version = 69,
|
version = 69,
|
||||||
|
Loading…
Reference in New Issue
Block a user