Ejemplo n.º 1
0
 public void OpenInterface(IPlayerSession session)
 {
     _checkPlayer = true;
     _position    = null;
     _userInterface.Open(session);
     UpdateUserInterface();
     Resync();
 }
Ejemplo n.º 2
0
 void IActivate.Activate(ActivateEventArgs eventArgs)
 {
     if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
     {
         return;
     }
     _interface.Open(actor.playerSession);
     UpdatePDAAppearance();
 }
Ejemplo n.º 3
0
        void IActivate.Activate(ActivateEventArgs eventArgs)
        {
            if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
            {
                return;
            }

            _userInterface.Open(actor.playerSession);
            return;
        }
Ejemplo n.º 4
0
 public bool UseEntity(UseEntityEventArgs eventArgs)
 {
     if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
     {
         return(false);
     }
     _mode = PaperAction.Read;
     UpdateUserInterface();
     _userInterface.Open(actor.playerSession);
     return(true);
 }
        /// <summary>
        /// Called when you click the owner entity with an empty hand. Opens the UI client-side if possible.
        /// </summary>
        /// <param name="args">Data relevant to the event such as the actor which triggered it.</param>
        void IActivate.Activate(ActivateEventArgs args)
        {
            if (!args.User.TryGetComponent(out IActorComponent actor))
            {
                return;
            }

            if (!args.User.TryGetComponent(out IHandsComponent hands))
            {
                _notifyManager.PopupMessage(Owner.Transform.GridPosition, args.User,
                                            _localizationManager.GetString("You have no hands."));
                return;
            }

            if (!Powered)
            {
                return;
            }

            var activeHandEntity = hands.GetActiveHand?.Owner;

            if (activeHandEntity == null)
            {
                _userInterface.Open(actor.playerSession);
            }
        }
Ejemplo n.º 6
0
 void IActivate.Activate(ActivateEventArgs eventArgs)
 {
     if (!eventArgs.User.TryGetComponent(out IActorComponent actor) || !Powered)
     {
         return;
     }
     UpdateUserInterface();
     _userInterface.Open(actor.playerSession);
 }
Ejemplo n.º 7
0
 void IActivate.Activate(ActivateEventArgs eventArgs)
 {
     if (!eventArgs.User.TryGetComponent(out IActorComponent actor) || !_powered)
     {
         return;
     }
     _uiDirty = true;
     _userInterface.Open(actor.playerSession);
 }
        bool IAttackHand.AttackHand(AttackHandEventArgs eventArgs)
        {
            if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
            {
                return(false);
            }

            _userInterface.Open(actor.playerSession);
            return(true);
        }
        bool IAttackHand.Attackhand(IEntity user)
        {
            if (!user.TryGetComponent(out IActorComponent actor))
            {
                return(false);
            }

            _userInterface.Open(actor.playerSession);
            return(true);
        }
 public void Activate(ActivateEventArgs args)
 {
     if (!args.User.TryGetComponent(out IActorComponent actor))
     {
         return;
     }
     if (!Powered)
     {
         return;
     }
     _userInterface.Open(actor.playerSession);
 }
Ejemplo n.º 11
0
 void IActivate.Activate(ActivateEventArgs eventArgs)
 {
     if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
     {
         return;
     }
     if (actor.playerSession.AttachedEntity.TryGetComponent(out BodyManagerComponent attempt))
     {
         _userInterface.SetState(PrepareBodyScannerInterfaceState(attempt.Template, attempt.PartDictionary));
     }
     _userInterface.Open(actor.playerSession);
 }
        void IActivate.Activate(ActivateEventArgs eventArgs)
        {
            if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
            {
                return;
            }

            if (!Powered)
            {
                return;
            }

            // always update the UI immediately before opening, just in case
            UpdateUIState();
            _userInterface.Open(actor.playerSession);
        }
Ejemplo n.º 13
0
        public void Activate(ActivateEventArgs eventArgs)
        {
            if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
            {
                return;
            }

            var wires = Owner.GetComponent <WiresComponent>();

            if (wires.IsPanelOpen)
            {
                wires.OpenInterface(actor.playerSession);
            }
            else
            {
                _userInterface.Open(actor.playerSession);
            }
        }
Ejemplo n.º 14
0
        public void Activate(ActivateEventArgs eventArgs)
        {
            if (!eventArgs.User.TryGetComponent(out IActorComponent actor))
            {
                return;
            }

            if (!eventArgs.User.TryGetComponent(out HumanoidAppearanceComponent looks))
            {
                Owner.PopupMessage(eventArgs.User, Loc.GetString("You can't have any hair!"));
                return;
            }

            _userInterface.Open(actor.playerSession);

            var msg = new MagicMirrorInitialDataMessage(looks.Appearance.HairColor, looks.Appearance.FacialHairColor, looks.Appearance.HairStyleName,
                                                        looks.Appearance.FacialHairStyleName);

            _userInterface.SendMessage(msg, actor.playerSession);
        }
Ejemplo n.º 15
0
 private void OpenUserInterface(IPlayerSession session)
 {
     _userInterface.Open(session);
 }
 public void OpenSurgeryUI(IPlayerSession session)
 {
     _userInterface.Open(session);
 }
 public void OpenUserInterface(IPlayerSession session)
 {
     UpdateUserInterface();
     _userInterface.Open(session);
 }
 public void OpenUserInterface(IPlayerSession session)
 {
     _userInterface.Open(session);
 }
Ejemplo n.º 19
0
 public void OpenInterface(IPlayerSession session)
 {
     _userInterface?.Open(session);
     UpdateUserInterface(true);
 }