舰R百科是靠无数自愿编辑者持续地建设更新完善的。编辑非常简单,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模块:舰娘:修订间差异

跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
第5行: 第5行:


local p = { }
local p = { }
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'


p['属性'] = function(frame)
p['属性'] = function(frame)
第36行: 第21行:
     return ship.cap1 + ship.cap2 + ship.cap3 + ship.cap4
     return ship.cap1 + ship.cap2 + ship.cap3 + ship.cap4
end
end
local typeName = {
    CV='航空母舰', CVL='轻型航空母舰', AV='装甲航母', BB='战列舰', BBV='航空战列舰', BC='战列巡洋舰',
    CA='重巡洋舰', CLT='重雷装巡洋舰', CL='轻巡洋舰', BM='浅水重炮舰', DD='驱逐舰', SC='重炮潜艇', SS='潜艇', AP='补给舰'
}


p['舰种代码'] = function(frame)
p['舰种代码'] = function(frame)
     local ship = ships[frame.args[1]]
     local ship = ships[frame.args[1]]
     if ship == nil then return '' end
     if ship == nil then return '' end
     return typeCode[ship.type]
     return ship.type:lower()
end
end


第46行: 第36行:
     local ship = ships[frame.args[1]]
     local ship = ships[frame.args[1]]
     if ship == nil then return '' end
     if ship == nil then return '' end
     return ship.type
     return typeName[ship.type]
end
end