Add Util script.

This commit is contained in:
hispidence 2022-04-02 17:52:39 +01:00
parent cfe813782b
commit e1f73b8daf

22
Scripts/Util.lua Normal file
View file

@ -0,0 +1,22 @@
local Util = {}
Util.ShortenTENCalls = function()
local ShortenInner
ShortenInner = function(tab)
for k, v in pairs(tab) do
if _G[k] then
print("WARNING! Key " .. k .. " already exists in global environment!")
else
_G[k] = v
if "table" == type(v) then
if nil == v.__type then
ShortenInner(v)
end
end
end
end
end
ShortenInner(TEN)
end
return Util