Ejemplo n.º 1
0
        public void Reset()
        {
            IPooledEnumerable eable = GetItemsInRange(10);

            foreach (Item target in eable)
            {
                if (target is OutpostFirepit)
                {
                    OutpostFirepit firepit = target as OutpostFirepit;
                    firepit.LinkedOutpost = this;
                    m_Fire = firepit;
                    firepit.TurnOff();

                    Active      = false;
                    TimeOfDecay = DateTime.MinValue;
                }

                if (target is OutpostSupplies)
                {
                    OutpostSupplies supplies = target as OutpostSupplies;
                    m_Supplies = supplies;
                    m_Supplies.Delete();
                    m_Supplies = null;
                }
                if (target is SmallTent)
                {
                    m_Tent = target;
                    m_Tent.Delete();
                    m_Tent = null;
                }
                if (target is OutpostBedroll)
                {
                    m_Bed = target;
                    m_Bed.Delete();
                    m_Bed = null;
                }
                if (target is CampStash)
                {
                    m_Stash = target;
                    m_Stash.Delete();
                    m_Stash = null;
                }
                if (target is AnkhWest)
                {
                    m_Ankh = target;
                    m_Ankh.Delete();
                    m_Ankh = null;
                }
            }
        }
Ejemplo n.º 2
0
        public override void CheckDecay()
        {
            if (m_Fire == null)
            {
                Reset();
            }

            if (!Decaying)
            {
                if (m_Fire != null && m_Fire.Active && !Active) //This should set outpost to active and begin decaying
                {
                    Active = true;
                    SetDecayTime();
                }
            }
            else if (TimeOfDecay < DateTime.UtcNow && m_Fire != null)
            {
                if (m_Stash != null)
                {
                    m_Stash.Delete();
                    m_Stash = null;
                }
                if (m_Ankh != null)
                {
                    m_Ankh.Delete();
                    m_Ankh = null;
                }
                if (m_Tent != null)
                {
                    m_Tent.Delete();
                    m_Tent = null;
                }
                if (m_Bed != null)
                {
                    m_Bed.Delete();
                    m_Bed = null;
                }
                if (m_Supplies != null)
                {
                    m_Supplies.Delete();
                    m_Supplies = null;
                }

                m_Fire.TurnOff();
                Active      = false;
                TimeOfDecay = DateTime.MinValue;
            }
        }