Gamerule Entities, Take 2 (#15765)

This commit is contained in:
Nemanja
2023-04-25 20:23:14 -04:00
committed by GitHub
parent 08ccb5367e
commit 59349b1b9b
124 changed files with 3102 additions and 4344 deletions

View File

@@ -0,0 +1,24 @@
using System.Threading;
namespace Content.Server.GameTicking.Rules.Components;
/// <summary>
/// Gamerule that ends the round after a period of inactivity.
/// </summary>
[RegisterComponent, Access(typeof(InactivityTimeRestartRuleSystem))]
public sealed class InactivityRuleComponent : Component
{
/// <summary>
/// How long the round must be inactive to restart
/// </summary>
[DataField("inactivityMaxTime", required: true)]
public TimeSpan InactivityMaxTime = TimeSpan.FromMinutes(10);
/// <summary>
/// The delay between announcing round end and the lobby.
/// </summary>
[DataField("roundEndDelay", required: true)]
public TimeSpan RoundEndDelay = TimeSpan.FromSeconds(10);
public CancellationTokenSource TimerCancel = new();
}