2023-08-30 21:06:15 -04:00
|
|
|
using Content.Shared.FixedPoint;
|
|
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Network;
|
|
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Points;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is a component that generically stores points for all players.
|
|
|
|
|
/// </summary>
|
2023-09-28 16:20:29 -07:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
|
|
|
|
|
[Access(typeof(SharedPointSystem))]
|
2023-08-30 21:06:15 -04:00
|
|
|
public sealed partial class PointManagerComponent : Component
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A dictionary of a player's netuserID to the amount of points they have.
|
|
|
|
|
/// </summary>
|
2023-09-29 22:14:16 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-08-30 21:06:15 -04:00
|
|
|
public Dictionary<NetUserId, FixedPoint2> Points = new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A text-only version of the scoreboard used by the client.
|
|
|
|
|
/// </summary>
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-08-30 21:06:15 -04:00
|
|
|
public FormattedMessage Scoreboard = new();
|
|
|
|
|
}
|