TabletopSession.cs 1017 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Numerics;
  2. using Robust.Shared.Map;
  3. using Robust.Shared.Player;
  4. namespace Content.Server.Tabletop
  5. {
  6. /// <summary>
  7. /// A class for storing data about a running tabletop game.
  8. /// </summary>
  9. public sealed class TabletopSession
  10. {
  11. /// <summary>
  12. /// The center position of this session.
  13. /// </summary>
  14. public readonly MapCoordinates Position;
  15. /// <summary>
  16. /// The set of players currently playing this tabletop game.
  17. /// </summary>
  18. public readonly Dictionary<ICommonSession, TabletopSessionPlayerData> Players = new();
  19. /// <summary>
  20. /// All entities bound to this session. If you create an entity for this session, you have to add it here.
  21. /// </summary>
  22. public readonly HashSet<EntityUid> Entities = new();
  23. public TabletopSession(MapId tabletopMap, Vector2 position)
  24. {
  25. Position = new MapCoordinates(position, tabletopMap);
  26. }
  27. }
  28. }