Esempio n. 1
0
    internal void RemoveTask(CreatureTask task)
    {
        if (task != null)
        {
            if (AvailableTasks.Contains(task))
            {
                AvailableTasks.Remove(task);
            }

            task.Destroy();
        }
    }
Esempio n. 2
0
        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();
        }