public static List <DefenseSquadTask> GetDefenseTasks(uint type) { List <DefenseSquadTask> tasks = new List <DefenseSquadTask>(); foreach (Base b in Bot.Main.BaseManager.Bases) { DefenseSquadTask task = new DefenseSquadTask(b, type); Bot.Main.TaskManager.Add(task); tasks.Add(task); } return(tasks); }
public static void Enable(bool excludeMainAndNatural, uint type) { if (Tasks.Count == 0) { foreach (Base b in Bot.Main.BaseManager.Bases) { DefenseSquadTask task = new DefenseSquadTask(b, type); Tasks.Add(task); Bot.Main.TaskManager.Add(task); } } Enable(Tasks, excludeMainAndNatural, excludeMainAndNatural); }