模块:家具图鉴:修订间差异
舰R百科,玩家自由编辑的战舰少女R百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的2个中间版本) | |||
| 第16行: | 第16行: | ||
local cnt = 0 | local cnt = 0 | ||
local ret = '{| class="wikitable" style="width:100%; text-align:center; "' | local ret = '{| class="wikitable" style="width:100%; text-align:center; "' | ||
for j,v in | for j,v in pairs(furns) do | ||
if v.star == star then | if v.star == star then | ||
if cnt < 2 then | if cnt < 2 then | ||
| 第26行: | 第26行: | ||
if cnt % 2 == 0 then | if cnt % 2 == 0 then | ||
ret = ret .. '\n|-' | ret = ret .. '\n|-' | ||
end | |||
end | |||
end | |||
if cnt % 2 ~= 0 then | |||
for i = cnt % 2 + 1, 2 do | |||
ret = ret .. '\n|' | |||
end | |||
end | |||
return ret .. '\n|}' | |||
end | |||
p['按套装'] = function(frame) | |||
curFrame = frame | |||
local caseId = tonumber(frame.args[1]) | |||
local cnt = 0 | |||
local ret = '{| class="wikitable" style="width:100%; text-align:center; "' | |||
for k = 6, 3, -1 do | |||
for j,v in pairs(furns) do | |||
if v.caseId == caseId and v.star == k then | |||
if cnt < 2 then | |||
ret = ret .. '\n| style="width:50%" |' .. expand(v.id) | |||
else | |||
ret = ret .. '\n|' .. expand(v.id) | |||
end | |||
cnt = cnt + 1 | |||
if cnt % 2 == 0 then | |||
ret = ret .. '\n|-' | |||
end | |||
end | end | ||
end | end | ||