Module:Songconstant:修订间差异

添加419字节 、​ 2024年3月30日 (星期六)
一些修改
(测试)
(一些修改)
第2行: 第2行:
local getData = require("Module:Arcaea Data")
local getData = require("Module:Arcaea Data")
local constantTable = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'ChartConstant.json' })
local constantTable = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'ChartConstant.json' })
local specialTransition={
["Quon (DJ Noriken)"]="quonwacca",
["Quon (Feryquitous)"]="quon",
["Genesis (Iris)"]="genesis",
["Genesis (Morrigan)"]="genesischunithm",
["#1f1e33"]="ifi",
["AI[UE]OON"]="aiueoon",
["[X]"]="infinity",
}
-- 你维好像没有关于这个的 直接的 东西
local p={}
local p={}


第18行: 第28行:
id=args["id"]
id=args["id"]
elseif args["name"] then
elseif args["name"] then
id=getData.singleSongInformation(args["name"],"name","mobile")("id")
local name=args["name"]
if specialTransition[name] then
id=specialTransition[name]
else
id=getData.singleSongInformation(name,"name","mobile")("id")
end
end
end
local diff=tonumber(args['diff'])
local diff=tonumber(args['diff'])
if constantTable[id][diff] then
if constantTable[id][diff] then
return constantTable[id][diff]["constant"]
return string.format("%.1f",constantTable[id][diff]["constant"])
end
end
return ""
return ""
464

个编辑