Move GameTicker.RoundDuration to Shared (#29425)
This commit is contained in:
@@ -622,11 +622,6 @@ namespace Content.Server.GameTicking
|
||||
}
|
||||
}
|
||||
|
||||
public TimeSpan RoundDuration()
|
||||
{
|
||||
return _gameTiming.CurTime.Subtract(RoundStartTimeSpan);
|
||||
}
|
||||
|
||||
private void AnnounceRound()
|
||||
{
|
||||
if (CurrentPreset == null) return;
|
||||
|
||||
@@ -5,12 +5,14 @@ using Robust.Shared.Replays;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Markdown.Mapping;
|
||||
using Robust.Shared.Serialization.Markdown.Value;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.GameTicking
|
||||
{
|
||||
public abstract class SharedGameTicker : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IReplayRecordingManager _replay = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
|
||||
// See ideally these would be pulled from the job definition or something.
|
||||
// But this is easier, and at least it isn't hardcoded.
|
||||
@@ -41,6 +43,11 @@ namespace Content.Shared.GameTicking
|
||||
{
|
||||
metadata["roundId"] = new ValueDataNode(RoundId.ToString());
|
||||
}
|
||||
|
||||
public TimeSpan RoundDuration()
|
||||
{
|
||||
return _gameTiming.CurTime.Subtract(RoundStartTimeSpan);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user