跳到内容
折叠侧栏
搜索
创建账号
个人工具
创建账号
登录
导航
首页
最近更改
随机页面
编者用页面
方针
指引
讨论版
格式手册
挂起清单
维护清单
玩法条目
游戏玩法
界面
机制
搭档
潜力值
Link Play
世界模式
故事模式
段位挑战
解歌系统
成就系统
版本更新日志
列表条目
定数表
曲目列表
曲包列表
曲师列表
谱师列表
画师列表
背景列表
友情链接
Rotaeno中文维基
工具
链入页面
相关更改
特殊页面
页面信息
查看“Module:Data”的源代码
模块
讨论
English
阅读
查看源代码
查看历史
更多
阅读
查看源代码
查看历史
←
Module:Data
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
local getArgs = require('Module:Arguments').getArgs local loadJson = require("Module:LoadJson") local p = {} function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame) return p[funcName](args) end end p.pack = makeInvokeFunc('_pack') function p._pack(args) local covList={ ['chunithm_append_1']='CHUNITHM Collaboration - Collaboration Chapter 2', ['dividedheart']='Divided Heart', ['groovecoaster']='Groove Coaster Collaboration', ['lanota']='Lanota Collaboration', ['tonesphere']='Tone Sphere Collaboration', ['chunithm']='CHUNITHM Collaboration', ['dynamix']='Dynamix Collaboration', ['maimai']='maimai Collaboration', ['ongeki']='O.N.G.E.K.I. Collaboration', ['single']='Memory Archive' } if covList[args[1]] then return covList[args[1]] end local json = loadJson.Packlist()['packs'] for i, k in ipairs(json) do if k['id'] == args[1] then return k['name_localized']['en'] end end end function p.unlock(songId) local json = loadJson.unlocks()['unlocks'] local result = {} for i, k in ipairs(json) do if k['songId'] == songId then result[tonumber(k['ratingClass'] + 1)] = k['conditions'] end end return result end p.song = makeInvokeFunc('_song') function p._song(args) local json if args['type'] or args[3] == 'ns' then json = loadJson.Songlist() else json = loadJson.SonglistNS() end return getSingle(json, args[1], args['index'])(args[2]) end function getSingle(json, index, genre) local s, list = "", {} if genre == "id" then list = json else for i, k in ipairs(json['songs']) do s = k['title_localized']['en'] list[s] = k end end return function(key) local info = list[index] if list[index] == nil then return nil end local switch = { ["id"] = function() return info["id"] end, ["title"] = function() return info['title_localized']['en'] end, ["artist"] = function() return info["artist"] end, ["bpm"] = function() return info["bpm"] end, ["set"] = function() return info["set"] end, ["side"] = function() return info["side"] end, ["date"] = function() return info["date"] end, ["version"] = function() return info["version"] end, ["bg"] = function() if info["bg"] ~= "" then return info["bg"] else if info["side"] == 0 then return 'base_light' else return 'base_conflict' end end end, ["pstChartDesigner"] = function() return info["difficulties"][1]['chartDesigner'] end, ["pstJacketDesigner"] = function() return info["difficulties"][1]['jacketDesigner'] end, ["pstRating"] = function() return info["difficulties"][1]['rating'] end, ["prsChartDesigner"] = function() return info["difficulties"][2]['chartDesigner'] end, ["prsJacketDesigner"] = function() return info["difficulties"][2]['jacketDesigner'] end, ["prsRating"] = function() return info["difficulties"][2]['rating'] end, ["ftrChartDesigner"] = function() return info["difficulties"][3]['chartDesigner'] end, ["ftrJacketDesigner"] = function() return info["difficulties"][3]['jacketDesigner'] end, ["ftrRating"] = function() if info["difficulties"][3]['ratingPlus'] then return info["difficulties"][3]['rating'] .. '+' else return info["difficulties"][3]['rating'] end end, ["bydChartDesigner"] = function() if info["difficulties"][4] then return info["difficulties"][4]['chartDesigner'] end end, ["bydJacketDesigner"] = function() if info["difficulties"][4] then return info["difficulties"][4]['jacketDesigner'] end end, ["bydRating"] = function() if info["difficulties"][4] then return info["difficulties"][4]['rating'] end end, ["pstChange"] = function() if info["difficulties"][1] then return info["difficulties"][1]['has_controller_alt_chart'] end end, ["prsChange"] = function() if info["difficulties"][2] then return info["difficulties"][2]['has_controller_alt_chart'] end end, ["ftrChange"] = function() if info["difficulties"][3] then return info["difficulties"][3]['has_controller_alt_chart'] end end } if switch[key] == nil then return nil end return switch[key]() end end function p.getMobile(name, id) if id then return getSingle(loadJson.Songlist(), id, 'id') else return getSingle(loadJson.Songlist(), name, 'name') end end function p.getNS(name, id) if id then return getSingle(loadJson.Songlist(), id, 'id') else return getSingle(loadJson.Songlist(), name, 'name') end end return p
本页使用的模板:
Module:Data/doc
(
查看源代码
)
返回
Module:Data
。