public void OpenInterface(IPlayerSession session) { _checkPlayer = true; _position = null; _userInterface.Open(session); UpdateUserInterface(); Resync(); }
void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent actor)) { return; } _interface.Open(actor.playerSession); UpdatePDAAppearance(); }
void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent actor)) { return; } _userInterface.Open(actor.playerSession); return; }
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); } }
void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent actor) || !Powered) { return; } UpdateUserInterface(); _userInterface.Open(actor.playerSession); }
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); }
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); }
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); } }
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); }
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); }
public void OpenInterface(IPlayerSession session) { _userInterface?.Open(session); UpdateUserInterface(true); }