govno edit

This commit is contained in:
Jabak
2024-10-01 23:37:57 +03:00
parent add1714328
commit 4ef857985c

View File

@@ -12,6 +12,7 @@ public sealed class RoundEndVoteSystem : EntitySystem
{ {
[Dependency] private readonly IVoteManager _voteManager = default!; [Dependency] private readonly IVoteManager _voteManager = default!;
[Dependency] private readonly GameTicker _gameTicker = default!; [Dependency] private readonly GameTicker _gameTicker = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
public override void Initialize() public override void Initialize()
{ {
@@ -20,10 +21,20 @@ public sealed class RoundEndVoteSystem : EntitySystem
private void OnRoundEndSystemChange(RoundEndSystemChangedEvent ev) private void OnRoundEndSystemChange(RoundEndSystemChangedEvent ev)
{ {
if(_gameTicker.RunLevel != GameRunLevel.PreRoundLobby) if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
return; return;
_voteManager.CreateStandardVote(null, StandardVoteType.Preset); var player = _playerManager.PlayerCount >= 20;
if (player)
{
_voteManager.CreateStandardVote(null, StandardVoteType.Preset);
}
else
{
_gameTicker.SetGamePreset("Secret");
}
_voteManager.CreateStandardVote(null, StandardVoteType.Map); _voteManager.CreateStandardVote(null, StandardVoteType.Map);
} }