Changes
Use logic from Vita ver for opening torpedo
function EnemyShipListKai:armament(ship)
function EnemyShipListKai:armament(ship)
local icons, roles = {}, {}
local icons, roles = {}, {}
local sonar, dc, air_power, midget_submarine = false, false, false, false
local sonar, dc, air_power, active_midget_submarine = false, false, false, false
for i = 1, ship:slots_length() do
for i = 1, ship:slots_length() do
elseif ShipCapabilities:_is_depth_charge(equipment) then
elseif ShipCapabilities:_is_depth_charge(equipment) then
dc = true
dc = true
elseif ShipCapabilities:_is_midget_submarine(equipment) then
elseif ShipCapabilities:_is_active_midget_submarine(equipment) then
active_midget_submarine = true
end
end
equipment_link, equipment = Formatting:format_link(equipment:link())
equipment_link, equipment = Formatting:format_link(equipment:link())
end
end
if ShipCapabilities:_is_submarine(ship) then
if ShipCapabilities:_is_submarine(ship) then
if ship:opening_torpedo() then
if ship:suffix():match("Elite") or ship:suffix():match("Flagship") then
table.insert(roles, self._opening_torpedo_label)
table.insert(roles, self._opening_torpedo_label)
end
end
elseif midget_submarine then
elseif active_midget_submarine then
table.insert(roles, self._opening_torpedo_label)
table.insert(roles, self._opening_torpedo_label)
end
end