欢迎来到气球塔防6 BWIKI!
除特殊说明外,本站内容采用CC BY-NC-SA 4.0协议。
欢迎各位到留言板留言或者加入QQ群:950568164

全站通知:

模块:TowerStats

来自气球塔防6WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

此模块的文档可以在模块:TowerStats/doc创建

local p = {}

function p.main(frame)
	local tower = frame.args[1]
	local key = nil -- 自动将key转成数字的垃圾lua
	
	local path = frame.args[2]
	local num = tonumber(path)
	if num and num >= 100 then
		key = num
	else
		key = path
	end
	
	local towerData = mw.text.jsonDecode(mw.title.new('module:TowerStats/'..tower..'.json'):getContent())
	return towerData[key]
end

return p