-
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~ 编辑帮助:目录 • BWIKI反馈留言板
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~ 编辑帮助:目录 • BWIKI反馈留言板
赛尔号WIKI精灵图鉴近期在调试新功能,精灵图鉴可能会出现显示错误的问题,还请谅解!
请选择语言:
模块:剧情/导航
此模块的文档可以在模块:剧情/导航/doc创建
local p={}
-- 处理单个关卡字符串
local function parseDisp(prop_str)
if prop_str == nil or prop_str==''then
return ''
end
local res = ''
local dsep = mw.ustring.find(prop_str, '#')
if dsep~=nil then
local disp_str = mw.ustring.sub(prop_str, dsep+1)
local link_str = mw.ustring.sub(prop_str, 1, dsep-1)
res = mw.ustring.format('[[%s|%s]]', link_str, disp_str)
else
res = mw.ustring.format('[[%s]]', prop_str)
end
return res
end
-- 按照逗号分割
function p.nav(frame)
local args = (frame == mw.getCurrentFrame() and frame.args) or frame
local link_str = args[1]
local res = ''
local psep = mw.ustring.find(link_str, ',')
local prop_str = ''
while psep~=nil do
prop_str = mw.ustring.sub(link_str, 1, psep-1)
link_str = mw.ustring.sub(link_str, psep+1)
psep = mw.ustring.find(link_str, ',')
res = res..parseDisp(prop_str)..'<br>'
end
res = res..parseDisp(link_str)
mw.log(res)
return res
end
-- function p.nav(frame)
-- -- local args = frame.args
-- -- local args = frame
-- local args = (frame == mw.getCurrentFrame() and frame.args) or frame
-- local prev_str = args[1]
-- local next_str = args[2]
-- local res = [[<div class="zs-DialogNavBox"><div class="zs-DialogNav">]]
-- res = res..parseLink(prev_str)
-- res = res..[[</div><div class="zs-DialogNav right">]]
-- res = res..parseLink(next_str)
-- res = res..[[</div></div>]]
-- mw.log(res)
-- return res
-- end
return p