public static double GetAirSuperiorityPotential(this PresetShipModel ship, AirSuperiorityCalculationOptions option) { var slots = new PresetShipData(ship).Ship.RawData.api_maxeq; return(ship.Slots .Select((x, y) => { var calc = new PresetSlotData(x).Item?.Type.GetCalculator() ?? EmptyCalculator.Instance; if (slots[y] <= 0) { return 0; } if (!option.HasFlag(calc.Options)) { return 0; } return calc.GetAirSuperiority(x, slots[y], option); }) .Sum()); }
public void Deserialize(string Data) => this.Source = PresetShipModel.Deserialize(Data);
public PresetShipData(PresetShipModel ship) { this.Source = ship; }