internal void RemoveTask(CreatureTask task) { if (task != null) { if (AvailableTasks.Contains(task)) { AvailableTasks.Remove(task); } task.Destroy(); } }
public void Delete() { if (_task is Build build) { Loc.GetStructureController().DestroyBlueprint(build.Blueprint); } if (Loc.GetFactionController().PlayerFaction.AssignedTasks.ContainsKey(_task)) { Loc.GetFactionController().PlayerFaction.AssignedTasks[_task].CancelTask(); } else { Loc.GetFactionController().PlayerFaction.AvailableTasks.Remove(_task); } _task.Destroy(); }