diff --git a/Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs b/Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs index dd66497b6efd4a..a95d0746b727c3 100644 --- a/Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs +++ b/Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs @@ -71,16 +71,24 @@ private void OnMessageAdded(ChatMessage msg) ? msg.MessageColorOverride.Value : msg.Channel.TextColor(); - if (_entityManager.HasComponent(_playerManager?.LocalPlayer?.ControlledEntity) - && (msg.Channel & ChatChannel.IC) != ChatChannel.None - && msg.SenderEntity != _playerManager?.LocalPlayer?.ControlledEntity) + var wrappedMessage = msg.WrappedMessage; + if (IsOrbit(msg.SenderEntity, msg.Channel)) { - msg.WrappedMessage += $"[cmdlink=\"({Loc.GetString("orbit-chat-click")})\" command=\"orbit {msg.SenderEntity}\"/]"; + var orbitButtonText = Loc.GetString("orbit-chat-click"); + wrappedMessage += $"\n[cmdlink=\"({orbitButtonText})\" command=\"orbit {msg.SenderEntity}\"][/cmdlink]"; } - AddLine(msg.WrappedMessage, color); + AddLine(wrappedMessage, color); } + private bool IsOrbit(EntityUid senderEntity, ChatChannel channel) + { + return (_entityManager.HasComponent(_playerManager.LocalPlayer?.ControlledEntity) + && (channel & (ChatChannel.IC ^ ChatChannel.Radio)) != ChatChannel.None + && senderEntity != _playerManager.LocalPlayer?.ControlledEntity); + } + + private void OnChannelSelect(ChatSelectChannel channel) { _controller.UpdateSelectedChannel(this); @@ -113,7 +121,7 @@ private void OnChannelFilter(ChatChannel channel, bool active) public void AddLine(string message, Color color) { - var formatted = new FormattedMessage(3); + var formatted = new FormattedMessage(4); formatted.PushColor(color); formatted.AddMarkup(message); formatted.Pop(); diff --git a/Content.Server/SS220/Commands/OrbitCommand.cs b/Content.Server/SS220/Commands/OrbitCommand.cs index 5f8c7192e2f097..17494ea3c55d06 100644 --- a/Content.Server/SS220/Commands/OrbitCommand.cs +++ b/Content.Server/SS220/Commands/OrbitCommand.cs @@ -1,6 +1,7 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Ghost.Components; +using Content.Server.Mind.Components; using Content.Shared.Administration; using Content.Shared.Follower; using Content.Shared.Follower.Components; @@ -55,7 +56,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) return; } - if (!_entityManager.HasComponent(entityToFollow)) + if (!_entityManager.HasComponent(entityToFollow)) { shell.WriteLine("You can't follow this entity"); return; diff --git a/Resources/Locale/ru-RU/ss220/orbit.ftl b/Resources/Locale/ru-RU/ss220/orbit.ftl index 929caa9cae7ea5..0899832c467c84 100644 --- a/Resources/Locale/ru-RU/ss220/orbit.ftl +++ b/Resources/Locale/ru-RU/ss220/orbit.ftl @@ -1 +1 @@ -orbit-chat-click = Наблюдать \ No newline at end of file +orbit-chat-click = Нажмите что бы наблюдать \ No newline at end of file