public IWaypointTask LoadTask(string taskName, XmlNode node) { if (!taskName.Contains("Task")) { taskName += "Task"; } taskName.Replace(" ", ""); switch (taskName.ToLower()) { case "cargotask": Task = new CargoTask(node); break; case "colonisetask": Task = new ColoniseTask(node); break; case "invadetask": Task = new InvadeTask(node); break; case "layminestask": Task = new LayMinesTask(node); break; case "scraptask": Task = new ScrapTask(node); break; case "splitmergetask": Task = new SplitMergeTask(node); break; default: Task = new NoTask(); break; } return(Task); }
/// <summary> /// Copy Constructor. /// </summary> /// <param name="other">SplitTask to copy.</param> public SplitMergeTask(SplitMergeTask copy) { LeftComposition = new Dictionary <long, ShipToken>(copy.LeftComposition); RightComposition = new Dictionary <long, ShipToken>(copy.RightComposition); OtherFleetKey = copy.OtherFleetKey; }