mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Move GameTicker.RoundDuration to Shared (#29425)
This commit is contained in:
parent
797aebb161
commit
e3896e45fc
2 changed files with 7 additions and 5 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue