模块:装备获得:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 |
无编辑摘要 |
||
| 第11行: | 第11行: | ||
local shipName = byIndex[i] | local shipName = byIndex[i] | ||
if shipName ~= nil then | if shipName ~= nil then | ||
local eq = {ships[shipName].eq1, ships[shipName].eq2, ships[shipName].eq3, ships[shipName].eq4} | local eq = {ships[shipName].eq1, ships[shipName].eq2, ships[shipName].eq3, ships[shipName].eq4} | ||
for k = 1, 4 do | for k = 1, 4 do | ||
if eq[k] == equiptName then | if eq[k] == equiptName then | ||
if 1000 < | if 1000 < ships[shipName].index and ships[shipName].index < 2000 then | ||
ret = ret .. '[[' .. string.sub(shipName, 1, -6) .. '|' .. shipName .. ']]、' | ret = ret .. '[[' .. string.sub(shipName, 1, -6) .. '|' .. shipName .. ']]、' | ||
else | else | ||
2017年5月7日 (日) 19:30的版本
此模块的文档可以在模块:装备获得/doc创建
local data = mw.loadData("模块:特殊数据/舰娘")
local ships = data.ships
local byIndex = data.byIndex
local p = { }
p['自带'] = function(frame)
local equiptName = frame.args[1]
local ret = ''
for i = 1,1300 do
local shipName = byIndex[i]
if shipName ~= nil then
local eq = {ships[shipName].eq1, ships[shipName].eq2, ships[shipName].eq3, ships[shipName].eq4}
for k = 1, 4 do
if eq[k] == equiptName then
if 1000 < ships[shipName].index and ships[shipName].index < 2000 then
ret = ret .. '[[' .. string.sub(shipName, 1, -6) .. '|' .. shipName .. ']]、'
else
ret = ret .. '[[' .. shipName .. ']]、'
end
end
end
end
end
ret = string.sub(ret, 1, -4)
if ret == '' then
ret = ''
else
ret = ret .. '自带'
end
return ret
end
return p