diff --git a/.gitmodules b/.gitmodules index 6351c9c852d..5a478a6b55a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "RobustToolbox"] path = RobustToolbox - url = https://github.com/space-wizards/RobustToolbox.git + url = https://github.com/Simple-Station/SupermatterEngine.git branch = master [submodule "StyleSheetify"] path = StyleSheetify diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs index c7fbf6c2dc0..3c03bb498d0 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs @@ -9,7 +9,10 @@ using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Configuration; using Robust.Shared.Input; +using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Client.Administration.UI.CustomControls; @@ -21,6 +24,10 @@ public sealed partial class PlayerListControl : BoxContainer private readonly IEntityManager _entManager; private readonly IUserInterfaceManager _uiManager; + // WD EDIT START + private readonly ISharedPlayerManager _playerManager; + private readonly IConfigurationManager _config; + // WD EDIT END private PlayerInfo? _selectedPlayer; @@ -34,6 +41,10 @@ public PlayerListControl() { _entManager = IoCManager.Resolve(); _uiManager = IoCManager.Resolve(); + // WD EDIT START + _playerManager = IoCManager.Resolve(); + _config = IoCManager.Resolve(); + // WD EDIT END _adminSystem = _entManager.System(); RobustXamlLoader.Load(this); // Fill the Option data @@ -98,7 +109,10 @@ private void FilterList() _sortedPlayerList.Clear(); foreach (var info in _playerList) { - var displayName = $"{info.CharacterName} ({info.Username})"; + // WD EDIT START + var displayName = $"{info.CharacterName} ({info.Username}@{AuthServer.GetServerFromCVarListByUrl(_config, + _playerManager.GetSessionById(info.SessionId).Channel.UserData.AuthServer)?.Id})"; + // WD EDIT END if (info.IdentityName != info.CharacterName) displayName += $" [{info.IdentityName}]"; if (!string.IsNullOrEmpty(FilterLineEdit.Text) diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs index cd6a56ea71e..51247823c35 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs @@ -2,8 +2,12 @@ using Content.Shared.Administration; using Robust.Client.AutoGenerated; using Robust.Client.GameObjects; +using Robust.Client.Player; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; +using Robust.Shared.Configuration; +using Robust.Shared.Network; +using Robust.Shared.Player; using Robust.Shared.Utility; namespace Content.Client.Administration.UI.CustomControls; @@ -11,9 +15,17 @@ namespace Content.Client.Administration.UI.CustomControls; [GenerateTypedNameReferences] public sealed partial class PlayerListEntry : BoxContainer { + // WD EDIT START + private readonly ISharedPlayerManager _playerManager; + private readonly IConfigurationManager _config; + // WD EDIT END public PlayerListEntry() { RobustXamlLoader.Load(this); + // WD EDIT START + _playerManager = IoCManager.Resolve(); + _config = IoCManager.Resolve(); + // WD EDIT END } public event Action? OnPinStatusChanged; @@ -36,8 +48,12 @@ public void Setup(PlayerInfo info, Func? overrideTex private void Update(PlayerInfo info, Func? overrideText) { - PlayerEntryLabel.Text = overrideText?.Invoke(info, $"{info.CharacterName} ({info.Username})") ?? - $"{info.CharacterName} ({info.Username})"; + // WD EDIT START + PlayerEntryLabel.Text = overrideText?.Invoke( + info, + $"{info.CharacterName} ({info.Username}@{AuthServer.GetServerFromCVarListByUrl(_config, + _playerManager.GetSessionById(info.SessionId).Channel.UserData.AuthServer)?.Id})") ?? $"{info.CharacterName} ({info.Username})"; + // WD EDIT END UpdatePinButtonTexture(info.IsPinned); } diff --git a/Content.Server/Administration/PlayerLocator.cs b/Content.Server/Administration/PlayerLocator.cs index 25cc7714686..a90b9b6f05e 100644 --- a/Content.Server/Administration/PlayerLocator.cs +++ b/Content.Server/Administration/PlayerLocator.cs @@ -1,4 +1,5 @@ using System.Collections.Immutable; +using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -101,7 +102,7 @@ public PlayerLocator() return ReturnForPlayerRecord(record); // If all else fails, ask the auth server. - var authServer = _configurationManager.GetCVar(CVars.AuthServer); + var authServer = AuthServer.FromStringList(_configurationManager.GetCVar(CVars.AuthServers)).First().AuthUrl; // WD EDIT var requestUri = $"{authServer}api/query/name?name={WebUtility.UrlEncode(playerName)}"; using var resp = await _httpClient.GetAsync(requestUri, cancel); @@ -120,7 +121,7 @@ public PlayerLocator() return ReturnForPlayerRecord(record); // If all else fails, ask the auth server. - var authServer = _configurationManager.GetCVar(CVars.AuthServer); + var authServer = AuthServer.FromStringList(_configurationManager.GetCVar(CVars.AuthServers)).First().AuthUrl; // WD EDIT var requestUri = $"{authServer}api/query/userid?userid={WebUtility.UrlEncode(userId.UserId.ToString())}"; using var resp = await _httpClient.GetAsync(requestUri, cancel); diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 0d21350f527..923996d43b6 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -13,6 +13,7 @@ using Content.Shared.Database; using Content.Shared.Mind; using Content.Shared.Players.RateLimiting; +using Robust.Shared; using Robust.Shared.Configuration; using Robust.Shared.Network; using Robust.Shared.Player; @@ -248,7 +249,20 @@ private void SendOOC(ICommonSession player, string message) } Color? colorOverride = null; - var wrappedMessage = Loc.GetString("chat-manager-send-ooc-wrap-message", ("playerName",player.Name), ("message", FormattedMessage.EscapeText(message))); + + // WD EDDIT START + var authServer = player.AuthType == LoginType.LoggedIn + ? AuthServer.FromStringList(_configurationManager.GetCVar(CVars.AuthServers)) + .FirstOrDefault(x => x.AuthUrl.ToString() == player.Channel.UserData.AuthServer) + ?.Id ?? "Unknown" + : "Unknown"; + var wrappedMessage = Loc.GetString( + "chat-manager-send-ooc-wrap-message", + ("playerName", $"{player.Name}"), + ("authServer", authServer), + ("message", FormattedMessage.EscapeText(message))); + // WD EDIT END + if (_adminManager.HasAdminFlag(player, AdminFlags.Admin)) { var prefs = _preferencesManager.GetPreferences(player.UserId); @@ -256,7 +270,14 @@ private void SendOOC(ICommonSession player, string message) } if ( _netConfigManager.GetClientCVar(player.Channel, CCVars.ShowOocPatronColor) && player.Channel.UserData.PatronTier is { } patron && PatronOocColors.TryGetValue(patron, out var patronColor)) { - wrappedMessage = Loc.GetString("chat-manager-send-ooc-patron-wrap-message", ("patronColor", patronColor),("playerName", player.Name), ("message", FormattedMessage.EscapeText(message))); + // WD EDIT START + wrappedMessage = Loc.GetString( + "chat-manager-send-ooc-patron-wrap-message", + ("patronColor", patronColor), + ("playerName", player.Name), + ("authServer", authServer), + ("message", FormattedMessage.EscapeText(message))); + // WD EDIT END } //TODO: player.Name color, this will need to change the structure of the MsgChatMessage diff --git a/Resources/Locale/en-US/chat/managers/chat-manager.ftl b/Resources/Locale/en-US/chat/managers/chat-manager.ftl index 555b0ccc860..a58889007ff 100644 --- a/Resources/Locale/en-US/chat/managers/chat-manager.ftl +++ b/Resources/Locale/en-US/chat/managers/chat-manager.ftl @@ -40,8 +40,14 @@ chat-manager-entity-me-wrap-message = [italic]{ PROPER($entity) -> } chat-manager-entity-looc-wrap-message = LOOC: {$entityName}: {$message} -chat-manager-send-ooc-wrap-message = OOC: {$playerName}: {$message} -chat-manager-send-ooc-patron-wrap-message = OOC: [color={$patronColor}]{$playerName}[/color]: {$message} +chat-manager-send-ooc-wrap-message = OOC: {$playerName}{$authServer -> + [Unknown] {""} + *[other] @{$authServer} +}: {$message} +chat-manager-send-ooc-patron-wrap-message = OOC: [color={$patronColor}]{$playerName}{$authServer -> + [Unknown] {""} + *[other] @{$authServer} +}[/color]: {$message} chat-manager-send-dead-chat-wrap-message = {$deadChannelName}: [BubbleHeader]{$playerName}[/BubbleHeader]: [BubbleContent]{$message}[/BubbleContent] chat-manager-send-admin-dead-chat-wrap-message = {$adminChannelName}: ([BubbleHeader]{$userName}[/BubbleHeader]): [BubbleContent]{$message}[/BubbleContent] diff --git a/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl b/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl index 907842f5eae..41f9486cdec 100644 --- a/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl +++ b/Resources/Locale/ru-RU/chat/managers/chat-manager.ftl @@ -37,8 +37,14 @@ chat-manager-entity-whisper-unknown-wrap-message = [font size=11][italic][Bubble chat-manager-entity-me-wrap-message = { $entityName } { $message } chat-manager-entity-looc-wrap-message = LOOC: {$entityName}: [BubbleContent]{$message}[/BubbleContent] -chat-manager-send-ooc-wrap-message = OOC: [bold]{$playerName}:[/bold] {$message} -chat-manager-send-ooc-patron-wrap-message = OOC: [color={$patronColor}]{$playerName}[/color]: {$message} +chat-manager-send-ooc-wrap-message = OOC: {$playerName}{$authServer -> + [Unknown] {""} + *[other] @{$authServer} +}: {$message} +chat-manager-send-ooc-patron-wrap-message = OOC: [color={$patronColor}]{$playerName}{$authServer -> + [Unknown] {""} + *[other] @{$authServer} +}[/color]: {$message} chat-manager-send-dead-chat-wrap-message = {$deadChannelName}: [bold][BubbleHeader]{$playerName}[/BubbleHeader]:[/bold] [BubbleContent]{$message}[/BubbleContent] chat-manager-send-admin-dead-chat-wrap-message = {$adminChannelName}: [bold]([BubbleHeader]{$userName}[/BubbleHeader]):[/bold] [BubbleContent]{$message}[/BubbleContent] diff --git a/RobustToolbox b/RobustToolbox index 84dcd658aac..5fa00c76ae9 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 84dcd658aac847edcb45c629b20a21905fabc12f +Subproject commit 5fa00c76ae999c228acb488e766fcff2b8bde80c