1.2
This commit is contained in:
@@ -3,11 +3,10 @@ using Content.Server.RoundEnd;
|
|||||||
using Content.Server.Voting.Managers;
|
using Content.Server.Voting.Managers;
|
||||||
using Content.Shared.Voting;
|
using Content.Shared.Voting;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server._Honk.RoundEndVote;
|
namespace Content.Server._Honk.RoundEndVote;
|
||||||
|
|
||||||
|
|
||||||
public sealed class RoundEndVoteSystem : EntitySystem
|
public sealed class RoundEndVoteSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IVoteManager _voteManager = default!;
|
[Dependency] private readonly IVoteManager _voteManager = default!;
|
||||||
@@ -24,6 +23,22 @@ public sealed class RoundEndVoteSystem : EntitySystem
|
|||||||
if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
|
if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (_playerManager.PlayerCount == 0)
|
||||||
|
{
|
||||||
|
_gameTicker.DelayStart(TimeSpan.FromSeconds(60));
|
||||||
|
Timer.Spawn(60 * 1000, () =>
|
||||||
|
{
|
||||||
|
if (_playerManager.PlayerCount >= 15)
|
||||||
|
{
|
||||||
|
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
|
||||||
|
}
|
||||||
|
else if (_playerManager.PlayerCount >= 5)
|
||||||
|
{
|
||||||
|
_gameTicker.SetGamePreset("Extended");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (_playerManager.PlayerCount >= 15)
|
if (_playerManager.PlayerCount >= 15)
|
||||||
{
|
{
|
||||||
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
|
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
|
||||||
|
|||||||
Reference in New Issue
Block a user