local p = {} local function notempty(s) return (s and s ~= "") end local titleset = mw.loadData("模块:kiraraf角色信息") local getArgs = require("Module:Arguments").getArgs local function wikitext(text1) return mw.getCurrentFrame():preprocess(text1) end function p.main(frame) local r = "|" if(notempty(frame.args["pre"])) then r = r .. "極" end r = r .. "#" .. frame.args[1] .. "(" .. frame.args[2] .. ")" r = r .. " || " if(notempty(frame.args[3])) then r = r .. "[https://www.bilibili.com/video/".. frame.args[3] .. " " .. frame.args[3] .. "]" else r = r .. "(暂无)" end if(notempty(frame.args["ex"])) then r = r .. "(" .. frame.args["ex"] .. ")" end r = r .. " || " if(notempty(frame.args["co"])) then r = r .. ' rowspan="2" | ' end if(notempty(frame.args["chara1"])) then if(frame.args["chara1"] == "无") then r = r .. "无" else r = r .."[[" .. (notempty(frame.args["guest1"]) or titleset[frame.args["chara1"]][3]) .. "]]【[[" if(notempty(frame.args["link1"]) or (frame.args["chara1"] ~= titleset[frame.args["chara1"]][1])) then r = r .. (notempty(frame.args["link1"]) or titleset[frame.args["chara1"]][1]) .. "|" end r = r .. frame.args["chara1"] .. "]]】" if(notempty(frame.args["chara2"])) then r = r .. "<br>[[" .. (notempty(frame.args["guest2"]) or titleset[frame.args["chara2"]][3]) .. "]]【[[" if(notempty(frame.args["link2"]) or (frame.args["chara2"] ~= titleset[frame.args["chara2"]][1])) then r = r .. (notempty(frame.args["link2"]) or titleset[frame.args["chara2"]][1]) .. "|" end r = r .. frame.args["chara2"] .. "]]】" end end r = r .. " || " end r = r .. frame.args[4] r = r .. " || " r = r .. frame.args["ref"] return r end return p