1
0

ActivatableUIEvents.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Robust.Shared.Player;
  2. namespace Content.Shared.UserInterface;
  3. public sealed class ActivatableUIOpenAttemptEvent : CancellableEntityEventArgs
  4. {
  5. public EntityUid User { get; }
  6. public ActivatableUIOpenAttemptEvent(EntityUid who)
  7. {
  8. User = who;
  9. }
  10. }
  11. public sealed class UserOpenActivatableUIAttemptEvent : CancellableEntityEventArgs //have to one-up the already stroke-inducing name
  12. {
  13. public EntityUid User { get; }
  14. public EntityUid Target { get; }
  15. public UserOpenActivatableUIAttemptEvent(EntityUid who, EntityUid target)
  16. {
  17. User = who;
  18. Target = target;
  19. }
  20. }
  21. public sealed class AfterActivatableUIOpenEvent : EntityEventArgs
  22. {
  23. public EntityUid User { get; }
  24. public readonly EntityUid Actor;
  25. public AfterActivatableUIOpenEvent(EntityUid who, EntityUid actor)
  26. {
  27. User = who;
  28. Actor = actor;
  29. }
  30. }
  31. /// <summary>
  32. /// This is after it's decided the user can open the UI,
  33. /// but before the UI actually opens.
  34. /// Use this if you need to prepare the UI itself
  35. /// </summary>
  36. public sealed class BeforeActivatableUIOpenEvent : EntityEventArgs
  37. {
  38. public EntityUid User { get; }
  39. public BeforeActivatableUIOpenEvent(EntityUid who)
  40. {
  41. User = who;
  42. }
  43. }
  44. public sealed class ActivatableUIPlayerChangedEvent : EntityEventArgs
  45. {
  46. }