govno edit
This commit is contained in:
@@ -12,6 +12,7 @@ public sealed class RoundEndVoteSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IVoteManager _voteManager = default!;
|
||||
[Dependency] private readonly GameTicker _gameTicker = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -20,10 +21,20 @@ public sealed class RoundEndVoteSystem : EntitySystem
|
||||
|
||||
private void OnRoundEndSystemChange(RoundEndSystemChangedEvent ev)
|
||||
{
|
||||
if(_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
|
||||
if (_gameTicker.RunLevel != GameRunLevel.PreRoundLobby)
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user