1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
40
Content.Shared/Points/PointManagerComponent.cs
Normal file
40
Content.Shared/Points/PointManagerComponent.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Points;
|
||||
|
||||
/// <summary>
|
||||
/// This is a component that generically stores points for all players.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedPointSystem))]
|
||||
public sealed partial class PointManagerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// A dictionary of a player's netuserID to the amount of points they have.
|
||||
/// </summary>
|
||||
[DataField("points")]
|
||||
public Dictionary<NetUserId, FixedPoint2> Points = new();
|
||||
|
||||
/// <summary>
|
||||
/// A text-only version of the scoreboard used by the client.
|
||||
/// </summary>
|
||||
[DataField("scoreboard")]
|
||||
public FormattedMessage Scoreboard = new();
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PointManagerComponentState : ComponentState
|
||||
{
|
||||
public Dictionary<NetUserId, FixedPoint2> Points;
|
||||
|
||||
public FormattedMessage Scoreboard;
|
||||
|
||||
public PointManagerComponentState(Dictionary<NetUserId, FixedPoint2> points, FormattedMessage scoreboard)
|
||||
{
|
||||
Points = points;
|
||||
Scoreboard = scoreboard;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user