打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模块:图鉴:修订间差异

来自舰R百科
Donnyjie留言 | 贡献
无编辑摘要
Donnyjie留言 | 贡献
无编辑摘要
 
第76行: 第76行:
     for i = l, r do
     for i = l, r do
         if byIndex[i] ~= nil and ships[byIndex[i]].type == type then
         if byIndex[i] ~= nil and ships[byIndex[i]].type == type then
            if cnt < 5 then
                ret = ret .. '\n|width="20%"|' .. expand(i)
            else
                ret = ret .. '\n|' .. expand(i)
            end
            cnt = cnt + 1
            if cnt % 5 == 0 then
                ret = ret .. '\n|-'
            end
        end
    end
    if cnt % 5 ~= 0 then
        for i = cnt % 5 + 1, 5 do
            ret = ret .. '\n|'
        end
    end
    return ret .. '\n|}'
end
p['按国籍'] = function(frame)
    curFrame = frame
    local type = frame.args[1]
    local l = tonumber(frame.args[2])
    local r = tonumber(frame.args[3])
    local cnt = 0
    local ret = '{| style="max-width:1000px"\n|-valign="bottom"'
    for i = l, r do
        if byIndex[i] ~= nil and ships[byIndex[i]].country == type then
             if cnt < 5 then
             if cnt < 5 then
                 ret = ret .. '\n|width="20%"|' .. expand(i)
                 ret = ret .. '\n|width="20%"|' .. expand(i)