Changes

no edit summary
Line 377: Line 377:     
function EquipmentData:combat_radius()
 
function EquipmentData:combat_radius()
    return self._combat_radius or self._flight_range
+
return self._combat_radius or self._flight_range
 
end
 
end
    
function EquipmentData:deployment_cost()
 
function EquipmentData:deployment_cost()
    return {fuel = false, ammo = false, steel = false, bauxite = self._deployment_cost or self._flight_cost, devmat = false, screw = false}
+
return {fuel = false, ammo = false, steel = false, bauxite = self._deployment_cost or self._flight_cost, devmat = false, screw = false}
 
end
 
end
    
EquipmentData.flight_range = EquipmentData.combat_radius
 
EquipmentData.flight_range = EquipmentData.combat_radius
 
EquipmentData.flight_cost = EquipmentData.deployment_cost
 
EquipmentData.flight_cost = EquipmentData.deployment_cost
 +
 +
function EquipmentData:is_lbas_plane()
 +
local eq_type = self:type()
 +
return eq_type == 6 -- Carrier-based Fighter Aircraft
 +
or eq_type == 7 -- Carrier-based Dive Bomber
 +
or eq_type == 8 -- Carrier-based Torpedo Bomber
 +
or eq_type == 9 -- Carrier-based Reconnaissance Aircraft
 +
or eq_type == 10 -- Reconnaissance Seaplane
 +
or eq_type == 11 -- Seaplane Bomber
 +
or eq_type == 41 -- Large Flying Boat
 +
or eq_type == 45 -- Seaplane Fighter
 +
or eq_type == 47 -- Land-based Attack Aircraft
 +
or eq_type == 48 -- Interceptor Fighter
 +
or eq_type == 56 -- Jet-powered Fighter Aircraft
 +
or eq_type == 57 -- Jet-powered Fighter-Bomber
 +
or eq_type == 58 -- Jet-powered Attack Aircraft
 +
or eq_type == 59 -- Jet-powered Recon Aircraft
 +
or eq_type == 94 -- Carrier-based Reconnaissance Aircraft (II)
 +
end
    
function EquipmentData:scrap()
 
function EquipmentData:scrap()
cssedit, gkautomate
7,064

edits