PointManagerComponent.cs 838 B

1234567891011121314151617181920212223242526
  1. using Content.Shared.FixedPoint;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Network;
  4. using Robust.Shared.Utility;
  5. namespace Content.Shared.Points;
  6. /// <summary>
  7. /// This is a component that generically stores points for all players.
  8. /// </summary>
  9. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
  10. [Access(typeof(SharedPointSystem))]
  11. public sealed partial class PointManagerComponent : Component
  12. {
  13. /// <summary>
  14. /// A dictionary of a player's netuserID to the amount of points they have.
  15. /// </summary>
  16. [DataField, AutoNetworkedField]
  17. public Dictionary<NetUserId, FixedPoint2> Points = new();
  18. /// <summary>
  19. /// A text-only version of the scoreboard used by the client.
  20. /// </summary>
  21. [DataField, AutoNetworkedField]
  22. public FormattedMessage Scoreboard = new();
  23. }