mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
# Description I didn't make 2 PRs because the queue kinda depends on Discord auth and I didn't wanna spend the time splitting them up. The queue puts everyone except admins/whitelisted/previously in-game players into a queue after the soft max players is reached, hard cap still denies new connections (and queues) from everyone. Priority queuing is simple to add and I'll do that when I make donator benefits or whatever similar system. --- <details><summary><h1>Media</h1></summary> <p> Too big to embed and I don't wanna compress it :) https://youtu.be/NBqN6Piv94w </p> </details> --- # Changelog 🆑 - add: Added a queue for players so you don't need to spam reconnect and hope you join when someone leaves.
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using Robust.Client.AutoGenerated;
|
|
using Robust.Client.Console;
|
|
using Robust.Client.UserInterface;
|
|
using Robust.Client.UserInterface.Controls;
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
namespace Content.Client.DiscordAuth;
|
|
|
|
[GenerateTypedNameReferences]
|
|
public sealed partial class DiscordAuthGui : Control
|
|
{
|
|
[Dependency] private readonly DiscordAuthManager _discordAuth = default!;
|
|
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
|
|
|
|
|
public DiscordAuthGui()
|
|
{
|
|
RobustXamlLoader.Load(this);
|
|
IoCManager.InjectDependencies(this);
|
|
LayoutContainer.SetAnchorPreset(this, LayoutContainer.LayoutPreset.Wide);
|
|
|
|
QuitButton.OnPressed += (_) =>
|
|
{
|
|
_consoleHost.ExecuteCommand("quit");
|
|
};
|
|
|
|
UrlEdit.Text = _discordAuth.AuthUrl;
|
|
OpenUrlButton.OnPressed += (_) =>
|
|
{
|
|
if (_discordAuth.AuthUrl != string.Empty)
|
|
{
|
|
IoCManager.Resolve<IUriOpener>().OpenUri(_discordAuth.AuthUrl);
|
|
}
|
|
};
|
|
}
|
|
}
|