|
|
| 第4行: |
第4行: |
|
| |
|
| local p = { } | | local p = { } |
|
| |
|
| |
| local function fixEquiptName(name)
| |
| name = string.gsub(name, '(', '(')
| |
| name = string.gsub(name, ')', ')')
| |
| name = string.gsub(name, 'Ⅲ', 'III')
| |
| name = string.gsub(name, 'Ⅵ', 'VI')
| |
| name = string.gsub(name, '日本', 'J国')
| |
| name = string.gsub(name, '德国', 'G国')
| |
| name = string.gsub(name, '英国', 'E国')
| |
| name = string.gsub(name, '美国', 'U国')
| |
| name = string.gsub(name, '意大利', 'I国')
| |
| name = string.gsub(name, '法国', 'F国')
| |
| name = string.gsub(name, '德国', 'G国')
| |
| name = string.gsub(name, '苏联', 'S国')
| |
| name = string.gsub(name, '中国', 'C国')
| |
| if ret == nil then ret = name end
| |
| return ret
| |
| end
| |
|
| |
|
| p['自带'] = function(frame) | | p['自带'] = function(frame) |
| local equiptName = frame.args[1] | | local equiptName = frame.args[1] |
| equiptName = fixEquiptName(equiptName)
| |
| local ret = '' | | local ret = '' |
| for i = 1,1300 do | | for i, v in pairs(ships) do |
| local shipName = byIndex[i] | | local shipName = byIndex[v.index] |
| 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 < v.index and v.index < 2000 then |
| if string.sub(shipName, -5, -1) == '·改' then
| | ret = ret .. '[[' .. string.sub(shipName, 1, -6) .. '|' .. shipName .. ']]、' |
| ret = ret .. '[[' .. string.sub(shipName, 1, -6) .. '|' .. shipName .. ']]、'
| | else |
| else
| | ret = ret .. '[[' .. shipName .. ']]、' |
| ret = ret .. '[[' .. shipName .. ']]、'
| |
| end
| |
| end | | end |
| end | | end |