using Content.Shared.FixedPoint;
using Content.Shared.Roles;
using Content.Shared.Storage;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.GameTicking.Rules.Components;
///
/// Gamerule that ends when a player gets a certain number of kills.
///
[RegisterComponent, Access(typeof(DeathMatchRuleSystem))]
public sealed partial class DeathMatchRuleComponent : Component
{
///
/// The number of points a player has to get to win.
///
[DataField("killCap"), ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 KillCap = 31;
///
/// How long until the round restarts
///
[DataField("restartDelay"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan RestartDelay = TimeSpan.FromSeconds(10f);
///
/// The person who won.
/// We store this here in case of some assist shenanigans.
///
[DataField("victor")]
public NetUserId? Victor;
///
/// An entity spawned after a player is killed.
///
[DataField("rewardSpawns")]
public List RewardSpawns = new();
///
/// The gear all players spawn with.
///
[DataField("gear", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string Gear = "DeathMatchGear";
}