1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Nemanja
2023-08-30 21:06:15 -04:00
committed by GitHub
parent 3f678104e3
commit 4d677f0685
44 changed files with 2821 additions and 155 deletions

View File

@@ -201,7 +201,7 @@ namespace Content.Server.RoundEnd
RaiseLocalEvent(RoundEndSystemChangedEvent.Default);
}
public void EndRound()
public void EndRound(TimeSpan? countdownTime = null)
{
if (_gameTicker.RunLevel != GameRunLevel.InRound) return;
LastCountdownStart = null;
@@ -211,17 +211,17 @@ namespace Content.Server.RoundEnd
_countdownTokenSource?.Cancel();
_countdownTokenSource = new();
var countdownTime = TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.RoundRestartTime));
countdownTime ??= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.RoundRestartTime));
int time;
string unitsLocString;
if (countdownTime.TotalSeconds < 60)
if (countdownTime.Value.TotalSeconds < 60)
{
time = countdownTime.Seconds;
time = countdownTime.Value.Seconds;
unitsLocString = "eta-units-seconds";
}
else
{
time = countdownTime.Minutes;
time = countdownTime.Value.Minutes;
unitsLocString = "eta-units-minutes";
}
_chatManager.DispatchServerAnnouncement(
@@ -229,7 +229,7 @@ namespace Content.Server.RoundEnd
"round-end-system-round-restart-eta-announcement",
("time", time),
("units", Loc.GetString(unitsLocString))));
Timer.Spawn(countdownTime, AfterEndRoundRestart, _countdownTokenSource.Token);
Timer.Spawn(countdownTime.Value, AfterEndRoundRestart, _countdownTokenSource.Token);
}
private void AfterEndRoundRestart()