LLWiki正在建设中,欢迎加入我们!
“模块:Sifitem”的版本间差异
跳转到导航
跳转到搜索
小 |
小 |
||
第29行: | 第29行: | ||
["友情pt"] = {file = "友情pt", after = " pt"}, |
["友情pt"] = {file = "友情pt", after = " pt"}, |
||
["loveca"] = {file = "Loveca", after = "个", default = 1}, |
["loveca"] = {file = "Loveca", after = "个", default = 1}, |
||
["体力恢复道具"] = {file = "体力恢复道具【LP50】", before = "体力恢复道具[LP50]", after = "个", default = 1}, |
["体力恢复道具"] = {file = "体力恢复道具【LP50】", before = "体力恢复道具[LP50] ", after = "个", default = 1}, |
||
["方糖"] = {file = "方糖【LP50】", before = "方糖[LP50]", after = "块", default = 1}, |
["方糖"] = {file = "方糖【LP50】", before = "方糖[LP50] ", after = "块", default = 1}, |
||
["糖罐50"] = {file = "糖罐【LP50%】", before = "糖罐[LP50%]", after = "个", default = 1}, |
["糖罐50"] = {file = "糖罐【LP50%】", before = "糖罐[LP50%] ", after = "个", default = 1}, |
||
["糖浆"] = {file = "糖浆【LP5】", before = "糖浆[LP5]", after = "个", default = 1}, |
["糖浆"] = {file = "糖浆【LP5】", before = "糖浆[LP5] ", after = "个", default = 1}, |
||
["糖罐100"] = {file = "糖罐【LP100%】", before = "糖罐[LP100%]", after = "个", default = 1}, |
["糖罐100"] = {file = "糖罐【LP100%】", before = "糖罐[LP100%] ", after = "个", default = 1}, |
||
["经验提升御守"] = {after = "个", default = 1}, |
["经验提升御守"] = {after = "个", default = 1}, |
||
["金币提升御守"] = {after = "个", default = 1}, |
["金币提升御守"] = {after = "个", default = 1}, |
||
第67行: | 第67行: | ||
if not data then |
if not data then |
||
return "" |
return "" |
||
elseif data.force2 and arg2 == nil then |
|||
return "<span class=\"error\">模板Sifitem缺失必要参数!</span>" |
|||
end |
end |
||
2021年1月3日 (日) 06:19的版本
-- Made with ♥ by User:Leranjun local p = {} local getArgs = require("Module:Arguments").getArgs local AKA = {["金币"] = "g", ["pt"] = "友情pt", ["爱心"] = "loveca", ["心"] = "loveca", ["lp50"] = "方糖", ["糖罐50%"] = "糖罐50", ["lp50%"] = "糖罐50", ["果冻"] = "糖浆", ["lp5"] = "糖浆", ["糖罐100%"] = "糖罐100", ["lp100%"] = "糖罐100", ["exp御守"] = "经验提升御守", ["经验御守"] = "经验提升御守", ["exp提升御守"] = "经验提升御守", ["金币御守"] = "金币提升御守", ["g御守"] = "金币提升御守", ["绊点御守"] = "绊点提升御守", ["绊御守"] = "绊点提升御守", ["钥匙"] = "活动剧情解锁钥匙", ["剧情钥匙"] = "活动剧情解锁钥匙", ["优等生招募券"] = "招募券", ["绿券"] = "招募券", ["薄荷券"] = "招募券", ["补助券"] = "辅助券", ["蓝券"] = "辅助券", ["机票"] = "辅助券", ["sr交换券"] = "活动sr交换券", ["彩贴纸"] = "u贴纸", ["彩贴"] = "u贴纸", ["金贴纸"] = "ss贴纸", ["金贴"] = "ss贴纸", ["银贴纸"] = "s贴纸", ["银贴"] = "s贴纸", ["粉贴纸"] = "贴纸", ["粉贴"] = "贴纸", ["n贴纸"] = "贴纸", ["r贴纸"] = "贴纸", ["专用贴纸"] = "活动ur觉醒专用贴纸", ["活动ur专用贴纸"] = "活动ur觉醒专用贴纸", ["剧情"] = "活动剧情" } local ITEMS = {["g"] = {before = "", after = " G"}, ["友情pt"] = {file = "友情pt", after = " pt"}, ["loveca"] = {file = "Loveca", after = "个", default = 1}, ["体力恢复道具"] = {file = "体力恢复道具【LP50】", before = "体力恢复道具[LP50] ", after = "个", default = 1}, ["方糖"] = {file = "方糖【LP50】", before = "方糖[LP50] ", after = "块", default = 1}, ["糖罐50"] = {file = "糖罐【LP50%】", before = "糖罐[LP50%] ", after = "个", default = 1}, ["糖浆"] = {file = "糖浆【LP5】", before = "糖浆[LP5] ", after = "个", default = 1}, ["糖罐100"] = {file = "糖罐【LP100%】", before = "糖罐[LP100%] ", after = "个", default = 1}, ["经验提升御守"] = {after = "个", default = 1}, ["金币提升御守"] = {after = "个", default = 1}, ["绊点提升御守"] = {after = "个", default = 1}, ["活动剧情解锁钥匙"] = {after = "把", default = 1}, ["称号"] = {before = "称号“", after = "”", force2 = true}, ["背景"] = {before = "【背景】"}, ["表情"] = {before = "【表情】"}, ["招募券"] = {after = "张", default = 1}, ["辅助券"] = {after = "张", default = 1}, ["活动sr交换券"] = {switch = { ["缪斯"] = " μ's", ["μ's"] = " μ's", ["μ"] = " μ's", ["μ’s"] = " μ's", ["缪"] = " μ's", ["aqours"] = " Aqours", ["水"] = " Aqours" }, after = "枚", default = 1}, ["u贴纸"] = {after = "枚", default = 1}, ["ss贴纸"] = {after = "枚", default = 1}, ["s贴纸"] = {after = "枚", default = 1}, ["贴纸"] = {after = "枚", default = 1}, ["活动ur觉醒专用贴纸"] = {after = "枚", default = 1}, ["活动剧情"] = {} } function p.main(frame) local args = getArgs(frame, {removeBlanks = false}) return p._main(args) end function p._main(args, frame) local arg1, arg2, arg3 = mw.ustring.lower(args[1] or ""), args[2], args[3] local item = AKA[arg1] or arg1 local data = ITEMS[item] if not data then return "" elseif data.force2 and arg2 == nil then return "<span class=\"error\">模板Sifitem缺失必要参数!</span>" end local file = data.file or mw.ustring.upper(item) local r = "<span class=\"game-item\">[[file:SIF "..file if (data.switch) then r = r..(data.switch[arg3] or "") else r = r..(arg3 and " 有框" or "") end r = r..".png|40px|link=]]</span> "..(data.before or file.." ")..(arg2 or data.default or "")..(data.after or "") return r end return p