public HornetAttackTaskGenerator(MyGridProgram program, HornetCombatSubsystem combatSystem, IAutopilot autopilot, IAgentSubsystem agentSubsystem, IMonitorSubsystem monitorSubsystem, IIntelProvider intelProvider) { Program = program; CombatSystem = combatSystem; Autopilot = autopilot; AgentSubsystem = agentSubsystem; MonitorSubsystem = monitorSubsystem; IntelProvider = intelProvider; HornetAttackTask = new HornetAttackTask(Program, CombatSystem, Autopilot, AgentSubsystem, MonitorSubsystem, IntelProvider); HornetAttackTask.Do(new Dictionary <MyTuple <IntelItemType, long>, IFleetIntelligence>(), TimeSpan.Zero, null); }
public ITask GenerateTask(TaskType type, MyTuple <IntelItemType, long> intelKey, Dictionary <MyTuple <IntelItemType, long>, IFleetIntelligence> IntelItems, TimeSpan canonicalTime, long myID) { if (MonitorSubsystem != null && (MonitorSubsystem.GetPercentage(MonitorOptions.Hydrogen) < 0.3 || MonitorSubsystem.GetPercentage(MonitorOptions.Cargo) < 0.1 || MonitorSubsystem.GetPercentage(MonitorOptions.Power) < 0.1)) { return(new NullTask()); } if (type != TaskType.Attack && type != TaskType.Picket) { return(new NullTask()); } HornetAttackTask.Reset(intelKey, type); return(HornetAttackTask); }