Files
Endfield-Data/LuaScripts/Common/Utils/JsonConst.lua
2025-12-02 20:37:18 +07:00

22 lines
477 B
Lua

local const = {}
local tmpConst = {
INVENTORY_MONEY_IDS = '["item_gold", "item_ap"]',
}
setmetatable(const, {
__index = function(_, k)
local succ, data = Tables.jsonConst:TryGetValue(k)
if succ then
return Utils.stringJsonToTable(data.value)
end
local value = tmpConst[k]
if value ~= nil then
return value
end
logger.error("No Json Const:", k)
return nil
end
})
return const