Changes

add support for opening asw
Line 36: Line 36:  
},
 
},
 
_asw_attack_modes = {
 
_asw_attack_modes = {
 +
    opening = "Opening",
 
day = "Day",
 
day = "Day",
 
night = "Night",
 
night = "Night",
Line 584: Line 585:  
function ShipCapabilities:asw_attack()
 
function ShipCapabilities:asw_attack()
 
local base_asw
 
local base_asw
local asw_override, day, night = self._ship:asw_attack(), true, true
+
local asw_override, opening, day, night = self._ship:asw_attack(), self._ship():opening_asw(), true, true
 
if asw_override == false then
 
if asw_override == false then
 
return false
 
return false
Line 627: Line 628:  
end
 
end
 
   
 
   
function ShipCapabilities:format_asw_attack(attack_power, day, night, uncertain)
+
function ShipCapabilities:format_asw_attack(attack_power, opening, day, night, uncertain)
 
if attack_power then
 
if attack_power then
 
attack_power = math.floor(attack_power)
 
attack_power = math.floor(attack_power)
 
local phases = {}
 
local phases = {}
 +
if opening then
 +
    table.insert(phases, self._asw_attack_modes.opening)
 +
    end
 
if day then
 
if day then
 
table.insert(phases, self._asw_attack_modes.day)
 
table.insert(phases, self._asw_attack_modes.day)
Anonymous user