small potential optimizations
This commit is contained in:
11
data.db
Normal file
11
data.db
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
currency_unit = "dims",
|
||||||
|
materials = {
|
||||||
|
Steel = 0.0625,
|
||||||
|
Wood = 0.00390625,
|
||||||
|
},
|
||||||
|
currencies = {
|
||||||
|
[ "Diamond(s)" ] = 1,
|
||||||
|
[ "Emerald(s)" ] = 0.01,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
local backend = require("backends.meshnetBackend")
|
local backend = require("backends.meshnetBackend")
|
||||||
local registeredTransforms = {}
|
local registeredTransforms = {}
|
||||||
local message_queue = {}
|
local message_queue = {}
|
||||||
|
|
||||||
local data = {}
|
local data = {}
|
||||||
|
|
||||||
local function loadData()
|
local function loadData()
|
||||||
@@ -61,7 +60,13 @@ local function generateEnviorment()
|
|||||||
if not focus[indx] then focus[indx] = {} end
|
if not focus[indx] then focus[indx] = {} end
|
||||||
focus = focus[indx]
|
focus = focus[indx]
|
||||||
else
|
else
|
||||||
focus[indx] = function (...) return load(v.body,v.name,"t",env)({},...) end
|
if not v.func then
|
||||||
|
focus[indx] = function (...) return load(v.body,v.name,"t",env)({},...) end
|
||||||
|
v.func = focus[indx]
|
||||||
|
else
|
||||||
|
focus[indx] = setfenv(v.func,env)
|
||||||
|
v.func = focus[indx]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user