Changes

Use *_leveled equipment functions
Line 284: Line 284:  
local equipment, size = self._ship:slot(i)
 
local equipment, size = self._ship:slot(i)
 
if equipment then
 
if equipment then
local equipment_firepower = equipment:firepower()
+
local equipment_firepower = equipment:firepower_leveled()
 
if equipment_firepower then
 
if equipment_firepower then
 
firepower = firepower + equipment_firepower
 
firepower = firepower + equipment_firepower
Line 356: Line 356:  
local equipment, size = self._ship:slot(i)
 
local equipment, size = self._ship:slot(i)
 
if equipment then
 
if equipment then
local equipment_torpedo = equipment:torpedo()
+
local equipment_torpedo = equipment:torpedo_leveled()
 
if equipment_torpedo then
 
if equipment_torpedo then
 
torpedo = torpedo + equipment_torpedo
 
torpedo = torpedo + equipment_torpedo
Line 461: Line 461:  
local equipment, size = self._ship:slot(i)
 
local equipment, size = self._ship:slot(i)
 
if equipment then
 
if equipment then
local equipment_firepower, equipment_torpedo = equipment:firepower(), equipment:torpedo()
+
local equipment_firepower, equipment_torpedo = equipment:firepower_leveled(), equipment:torpedo_leveled()
 
if self:_is_main_gun(equipment) then
 
if self:_is_main_gun(equipment) then
 
main_guns = main_guns + 1
 
main_guns = main_guns + 1
Line 566: Line 566:  
opening_torpedo = true
 
opening_torpedo = true
 
end
 
end
local equipment_torpedo = equipment:torpedo()
+
local equipment_torpedo = equipment:torpedo_leveled()
 
if equipment_torpedo then
 
if equipment_torpedo then
 
torpedo = torpedo + equipment_torpedo
 
torpedo = torpedo + equipment_torpedo
Line 609: Line 609:  
bomber = true
 
bomber = true
 
end
 
end
equipment_asw = equipment_asw + (equipment:asw() or 0)
+
equipment_asw = equipment_asw + (equipment:asw_leveled() or 0)
 
end
 
end
 
end
 
end
cssedit, gkautomate
7,064

edits