Automatic server replay recordings (#18235)

Co-authored-by: Moony <moony@hellomouse.net>
This commit is contained in:
Pieter-Jan Briers
2023-07-23 16:02:23 +02:00
committed by GitHub
parent 3f12b2816c
commit c6d2dd6c7b
4 changed files with 139 additions and 2 deletions

View File

@@ -307,8 +307,8 @@ namespace Content.Shared.CCVar
CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY);
/// <summary>
/// How many times per second artifacts when the round is over.
/// If set to 0, they won't activate (on a timer) when the round ends.
/// How many times per second artifacts when the round is over.
/// If set to 0, they won't activate (on a timer) when the round ends.
/// </summary>
public static readonly CVarDef<float> ArtifactRoundEndTimer = CVarDef.Create("game.artifact_round_end_timer", 0.5f, CVar.NOTIFY | CVar.REPLICATED);
@@ -1676,5 +1676,32 @@ namespace Content.Shared.CCVar
/// </summary>
public static readonly CVarDef<bool> ReplayRecordAdminChat =
CVarDef.Create("replay.record_admin_chat", false, CVar.ARCHIVE);
/// <summary>
/// Automatically record full rounds as replays.
/// </summary>
public static readonly CVarDef<bool> ReplayAutoRecord =
CVarDef.Create("replay.auto_record", false, CVar.SERVERONLY);
/// <summary>
/// The file name to record automatic replays to. The path is relative to <see cref="CVars.ReplayDirectory"/>.
/// </summary>
/// <remarks>
/// <para>
/// If the path includes slashes, directories will be automatically created if necessary.
/// </para>
/// <para>
/// A number of substitutions can be used to automatically fill in the file name: <c>{year}</c>, <c>{month}</c>, <c>{day}</c>, <c>{hour}</c>, <c>{minute}</c>, <c>{round}</c>.
/// </para>
/// </remarks>
public static readonly CVarDef<string> ReplayAutoRecordName =
CVarDef.Create("replay.auto_record_name", "{year}_{month}_{day}-{hour}_{minute}-round_{round}.zip", CVar.SERVERONLY);
/// <summary>
/// Path that, if provided, automatic replays are initially recorded in.
/// When the recording is done, the file is moved into its final destination.
/// </summary>
public static readonly CVarDef<string> ReplayAutoRecordTempDir =
CVarDef.Create("replay.auto_record_temp_dir", "", CVar.SERVERONLY);
}
}