1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -1,33 +1,46 @@
|
||||
namespace Content.Server.GameTicking.Rules.Components;
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// Simple GameRule that will do a free-for-all death match.
|
||||
/// Kill everybody else to win.
|
||||
/// Gamerule that ends when a player gets a certain number of kills.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(DeathMatchRuleSystem))]
|
||||
public sealed partial class DeathMatchRuleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of points a player has to get to win.
|
||||
/// </summary>
|
||||
[DataField("killCap"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public FixedPoint2 KillCap = 31;
|
||||
|
||||
/// <summary>
|
||||
/// How long until the round restarts
|
||||
/// </summary>
|
||||
[DataField("restartDelay"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float RestartDelay = 10f;
|
||||
public TimeSpan RestartDelay = TimeSpan.FromSeconds(10f);
|
||||
|
||||
/// <summary>
|
||||
/// How long after a person dies will the restart be checked
|
||||
/// The person who won.
|
||||
/// We store this here in case of some assist shenanigans.
|
||||
/// </summary>
|
||||
[DataField("deadCheckDelay"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float DeadCheckDelay = 5f;
|
||||
[DataField("victor")]
|
||||
public NetUserId? Victor;
|
||||
|
||||
/// <summary>
|
||||
/// A timer for checking after a death
|
||||
/// An entity spawned after a player is killed.
|
||||
/// </summary>
|
||||
[DataField("deadCheckTimer"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float? DeadCheckTimer;
|
||||
[DataField("rewardSpawns")]
|
||||
public List<EntitySpawnEntry> RewardSpawns = new();
|
||||
|
||||
/// <summary>
|
||||
/// A timer for the restart.
|
||||
/// The gear all players spawn with.
|
||||
/// </summary>
|
||||
[DataField("restartTimer"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public float? RestartTimer;
|
||||
[DataField("gear", customTypeSerializer: typeof(PrototypeIdSerializer<StartingGearPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string Gear = "DeathMatchGear";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user