模块:掉落:修订间差异
跳转到导航
跳转到搜索
(创建页面,内容为“local data = mw.loadData("模块:数据库/掉落") local maps = data.maps local p = { } p['掉落地图'] = function(frame) local shipName = frame.args[1] local ret = '' mapList={ '1-1', '1-2', '1-3', '1-4', '1-5', '2-1', '2-2', '2-3', '2-4', '2-5', '2-6', '3-1', '3-2', '3-3', '3-4', '4-1', '4-2', '4-3', '4-4', '5-1', '5-2', '5-3', '5-4', '5-5', '6-1', '6-2', '6-3', '6-4', '7-1', '7-2', '7-3', '7-4', '7-5', '8-1', '8-2', '8-3', '8-4', '8…”) |
无编辑摘要 |
||
第30行: | 第30行: | ||
ret = string.sub(ret, 1, -2) | ret = string.sub(ret, 1, -2) | ||
end | end | ||
return p |
2024年5月15日 (三) 18:39的版本
此模块的文档可以在模块:掉落/doc创建
local data = mw.loadData("模块:数据库/掉落")
local maps = data.maps
local p = { }
p['掉落地图'] = function(frame)
local shipName = frame.args[1]
local ret = ''
mapList={
'1-1', '1-2', '1-3', '1-4', '1-5',
'2-1', '2-2', '2-3', '2-4', '2-5', '2-6',
'3-1', '3-2', '3-3', '3-4',
'4-1', '4-2', '4-3', '4-4',
'5-1', '5-2', '5-3', '5-4', '5-5',
'6-1', '6-2', '6-3', '6-4',
'7-1', '7-2', '7-3', '7-4', '7-5',
'8-1', '8-2', '8-3', '8-4', '8-5',
'9-1', '9-2', '9-3',
'决战E1、E2', '决战E3、E4', '决战E5', '决战E6',
}
for k, map in ipairs(mapList) do
for k1, ship in pairs(maps[map]) do
if ship == shipName then
ret = ret .. map .. ','
break
end
end
end
ret = string.sub(ret, 1, -2)
end
return p