Esempio n. 1
0
        protected override IEnumerable <IJob> GetJobs(ILivingObject living)
        {
            foreach (var p in m_area.Range())
            {
                if (m_map[p] == null)
                {
                    var td = m_environment.GetTileData(p);

                    if (!td.IsClear)
                    {
                        IJob job;

                        if (td.HasFellableTree)
                        {
                            job = new Dwarrowdelf.Jobs.AssignmentGroups.MoveFellTreeAssignment(this, m_environment, p);
                        }
                        else
                        {
                            throw new NotImplementedException();
                        }

                        AddSubJob(job);
                        m_map[p] = job;
                    }
                }

                if (m_map[p] != null)
                {
                    yield return(m_map[p]);
                }
            }
        }
Esempio n. 2
0
        protected override IEnumerable<IJob> GetJobs(ILivingObject living)
        {
            foreach (var p in m_area.Range())
            {
                if (m_map[p] == null)
                {
                    var interiorID = m_environment.GetInteriorID(p);

                    if (!interiorID.IsClear())
                    {
                        IJob job;

                        if (interiorID == InteriorID.Tree || interiorID == InteriorID.Sapling)
                        {
                            job = new Dwarrowdelf.Jobs.AssignmentGroups.MoveFellTreeAssignment(this, m_environment, p);
                        }
                        else
                        {
                            throw new NotImplementedException();
                        }

                        AddSubJob(job);
                        m_map[p] = job;
                    }
                }

                if (m_map[p] != null)
                    yield return m_map[p];
            }
        }
Esempio n. 3
0
        protected override IEnumerable<IJob> GetJobs(ILivingObject living)
        {
            foreach (var p in m_area.Range())
            {
                if (m_map[p] == null)
                {
                    var td = m_environment.GetTileData(p);

                    if (!td.IsClear)
                    {
                        IJob job;

                        if (td.HasFellableTree)
                        {
                            job = new Dwarrowdelf.Jobs.AssignmentGroups.MoveFellTreeAssignment(this, m_environment, p);
                        }
                        else
                        {
                            throw new NotImplementedException();
                        }

                        AddSubJob(job);
                        m_map[p] = job;
                    }
                }

                if (m_map[p] != null)
                    yield return m_map[p];
            }
        }