Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Secret] Update queue #1477

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Content.Server/Connection/ConnectionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private async Task NetMgrOnConnecting(NetConnectingArgs e)
}

// Corvax-Queue-Start
var isQueueEnabled = _cfg.GetCVar(CCCVars.QueueEnabled);
var isQueueEnabled = IoCManager.Instance!.TryResolveType<IServerJoinQueueManager>(out var mgr) && mgr.IsEnabled;
if (_plyMgr.PlayerCount >= _cfg.GetCVar(CCVars.SoftMaxPlayers) && !isPrivileged && !isQueueEnabled)
// Corvax-Queue-End
{
Expand Down
10 changes: 0 additions & 10 deletions Content.Shared/Corvax/CCCVars/CCCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ namespace Content.Shared.Corvax.CCCVars;
// ReSharper disable once InconsistentNaming
public sealed class CCCVars
{
/*
* Queue
*/

/// <summary>
/// Controls if the connections queue is enabled. If enabled stop kicking new players after `SoftMaxPlayers` cap and instead add them to queue.
/// </summary>
public static readonly CVarDef<bool>
QueueEnabled = CVarDef.Create("queue.enabled", false, CVar.SERVERONLY);

/**
* TTS (Text-To-Speech)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

public interface IServerJoinQueueManager
{
public bool IsEnabled { get; }
public int PlayerInQueueCount { get; }
public int ActualPlayersCount { get; }
public void Initialize();
public void PostInitialize();
}
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/athara.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ time = 180.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/echo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ time = 180.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/elysium.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ time = 10.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/main.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ time = 180.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/nova.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ time = 10.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions Resources/ConfigPresets/Corvax/solaris.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ time = 180.0

[queue]
enabled = true
alt_servers = true

[tts]
enabled = true
Expand Down
4 changes: 4 additions & 0 deletions Resources/Locale/ru-RU/corvax/join-queue/queue-screen.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ queue-quit = Выйти
queue-position = Ваша позиция:
queue-total = Всего в очереди:
queue-priority-join = Приоритетный вход
queue-server-title = Вы можете подключиться к:
queue-server-not-available = Нет доступных серверов
queue-server-online = Онлайн:
queue-server-connect = Подключиться
2 changes: 1 addition & 1 deletion Secrets
Submodule Secrets updated from 3527f4 to 9851c2
Loading