Beispiel #1
0
 public ShipState(ShipFit fit, Bot bot)
 {
     this.bot    = bot;
     this.memory = bot.MemoryMeasurementAtTime.Value;
     Maneuver    = (memory?.ShipUi?.Indication?.LabelText?.Any(lt => lt.Text == "Keeping at Range") ?? false)
                         ? ShipManeuverTypeEnum.KeepAtRange
                         : memory.ShipUi.Indication.ManeuverType ?? ShipManeuverTypeEnum.None;
     ActiveTargets = new ActiveTargetsContoller(bot, memory);
     Fit           = fit;
     Drones        = new DronesContoller(memory);
 }
 public MemoryProxyInventoryProvider(Bot bot, IWindowInventory selectedWindowInventory = null)
 {
     this.bot                     = bot;
     memoryMeasurement            = bot.MemoryMeasurementAtTime.Value;
     this.selectedWindowInventory = selectedWindowInventory ?? memoryMeasurement?.WindowInventory?[0];
 }
 public static bool ManeuverStartPossible(this IMemoryMeasurement memoryMeasurement)
 {
     return(!(memoryMeasurement?.IsDocked ?? false) &&
            !new[] { ShipManeuverTypeEnum.Warp, ShipManeuverTypeEnum.Jump, ShipManeuverTypeEnum.Docked }.Contains(
                memoryMeasurement?.ShipUi?.Indication?.ManeuverType ?? ShipManeuverTypeEnum.None));
 }