Exemplo n.º 1
0
        public void TryAddSpawner()
        {
            if (BadNavigation() || !AllowAccess(true))
                return;

            if (m_Guild == null || !(m_Guild is GovernmentEntity))
                return;

            if (GovernmentEntity.IsGuildMilitary(m_Viewer, m_Guild))
            {
                foreach (Item item in m_Viewer.GetItemsInRange(0))
                {
                    if (item is MilitarySpawner && ((MilitarySpawner)item).Government == m_Guild)
                    {
                        m_Viewer.SendMessage("Your organization already has a military spawner at your current location.");
                        return;
                    }
                }

                MilitarySpawner spawner = new MilitarySpawner((GovernmentEntity)m_Guild);

                spawner.MoveToWorld(m_Viewer.Location, m_Viewer.Map);

                m_Viewer.SendMessage("You have successfully added a military spawner at your current location. Station a soldier there to begin using it.");
            }
            else
                m_Viewer.SendMessage("You must be military personnel of " + m_Guild.Name.ToString() + " to do that.");
        }
Exemplo n.º 2
0
 public AssignWayPointTarget(MilitarySpawner spawner)
     : base(14, false, TargetFlags.None)
 {
     m_Spawner = spawner;
 }