모듈:CodexData
Project ZETA Wiki
더 많은 작업
이 모듈에 대한 설명문서는 모듈:CodexData/설명문서에서 만들 수 있습니다
local p = {}
local codexData = mw.loadData('Module:CodexData/data')
local funcs = {
['name'] = function(data) return data.name end,
['title'] = function(data) return data.title end,
['type'] = function(data) return data.type end,
['cost'] = function(data) return data.cost end,
['stat_n1'] = function(data) return data.stats.temp end,
['stat_d1'] = function(data) return data.stats.temp end,
['unlock_t2'] = function(data) return data.unlocks.temp end,
['unlock_t4'] = function(data) return data.unlocks.temp end,
['subd_n1'] = function(data) return data.unlocks.temp end,
['subd_d1'] = function(data) return data.unlocks.temp end,
}
local function getData(champname, data)
return data[champname] or {}
end
function p.get(frame)
local args = frame.args
return funcs[args.datatype](getData(args.champname, codexData))
end
return p