模块:数据:修订间差异
来自舰R百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示1个用户的8个中间版本) | |||
| 第1行: | 第1行: | ||
local tr = mw.loadData("模块:对照表") | local tr = mw.loadData("模块:对照表") | ||
local | local equipts = mw.loadData("模块:特殊数据/装备").equipts | ||
local ships = mw.loadData("模块:特殊数据/舰娘").ships | |||
local ships = | local byIndex = mw.loadData("模块:特殊数据/舰娘").byIndex | ||
local byIndex = | |||
local enemy = mw.loadData("模块:敌舰数据") | local enemy = mw.loadData("模块:敌舰数据") | ||
local enemyShips = enemy.ships | local enemyShips = enemy.ships | ||
| 第75行: | 第74行: | ||
local shipName = frame.args[1] | local shipName = frame.args[1] | ||
return replaceCountryName(ships[shipName]['简介']) | return replaceCountryName(ships[shipName]['简介']) | ||
end | |||
p['改造'] = function(frame) | |||
local shipName = frame.args[1] | |||
local mod = ships[shipName].mod | |||
if mod == nil then mod = '' end | |||
return mod | |||
end | end | ||
| 第80行: | 第86行: | ||
local shipName = frame.args[1] | local shipName = frame.args[1] | ||
local dialogue = frame.args[2] | local dialogue = frame.args[2] | ||
local force = frame.args[3] | |||
if force ~= nil and force ~= '' then return force end | |||
if shipName == '' then return '' end | if shipName == '' then return '' end | ||
local ret = ships[shipName][dialogue] | local ret = ships[shipName][dialogue] | ||
| 第94行: | 第102行: | ||
return byIndex[idx % 1000] | return byIndex[idx % 1000] | ||
end | end | ||
local typeCode = { } | |||
typeCode['航空母舰'] = 'cv' | |||
typeCode['轻型航空母舰'] = 'cvl' | |||
typeCode['装甲航母'] = 'av' | |||
typeCode['战列舰'] = 'bb' | |||
typeCode['航空战列舰'] = 'bbv' | |||
typeCode['战列巡洋舰'] = 'bc' | |||
typeCode['重巡洋舰'] = 'ca' | |||
typeCode['轻巡洋舰'] = 'cl' | |||
typeCode['浅水重炮舰'] = 'bm' | |||
typeCode['驱逐舰'] = 'dd' | |||
typeCode['重炮潜艇'] = 'sc' | |||
typeCode['潜艇'] = 'ss' | |||
typeCode['补给舰'] = 'ap' | |||
local curFrame = nil | local curFrame = nil | ||
local function expand( | local function expand(idx) | ||
local | local name = byIndex[idx] | ||
local link = byIndex[idx % 1000] | |||
local ship = ships[name] | |||
local moe = ship['萌王'] | |||
if moe == nil then moe = '' end | |||
local args = { idx, name:gsub('·改', ''), link, ship.rarity, typeCode[ship.type], moe } | |||
return curFrame:expandTemplate{ title = '图鉴立绘2', args = args } | |||
end | end | ||
| 第112行: | 第138行: | ||
part1 = part1 .. prefix | part1 = part1 .. prefix | ||
if byIndex[i] ~= nil then | if byIndex[i] ~= nil then | ||
part1 = part1 .. expand( | part1 = part1 .. expand(i) | ||
empty1 = false | empty1 = false | ||
end | end | ||
| 第120行: | 第146行: | ||
part2 = part2 .. prefix | part2 = part2 .. prefix | ||
if byIndex[i] ~= nil then | if byIndex[i] ~= nil then | ||
part2 = part2 .. expand( | part2 = part2 .. expand(i) | ||
empty2 = false | empty2 = false | ||
end | end | ||
| 第141行: | 第167行: | ||
local ret = '' | local ret = '' | ||
local buf = '' | local buf = '' | ||
for i = | for i = l, r, 10 do | ||
local title = '===No.' .. (i + 1) .. '~' .. (i + 10) .. '===\n' | local title = '===No.' .. (i + 1) .. '~' .. (i + 10) .. '===\n' | ||
local list = genShipList(i) | local list = genShipList(i) | ||
| 第280行: | 第296行: | ||
p.debug = function() | p.debug = function() | ||
f = { } | f = { } | ||
f.args = { } | f.args = {'1', '400' } | ||
return p['图鉴'](f) | return p['图鉴'](f) | ||
end | end | ||
return p | return p | ||