diff --git a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs index af977f763c..5ab3a71bb3 100644 --- a/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs +++ b/Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml.cs @@ -12,7 +12,6 @@ using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Network; using Robust.Shared.Utility; -using Robust.Shared.Timing; using Robust.Shared.Configuration; namespace Content.Client.Administration.UI.Bwoink @@ -49,39 +48,11 @@ namespace Content.Client.Administration.UI.Bwoink ChannelSelector.OnSelectionChanged += sel => { _currentPlayer = sel; - SwitchToChannel(sel?.SessionId); + SwitchToChannel(sel.SessionId); ChannelSelector.PlayerListContainer.DirtyList(); }; - ChannelSelector.OverrideText += (info, text) => - { - var sb = new StringBuilder(); - - if (info.Connected) - sb.Append('●'); - else - sb.Append(info.ActiveThisRound ? '○' : '·'); - - sb.Append(' '); - if (AHelpHelper.TryGetChannel(info.SessionId, out var panel) && panel.Unread > 0) - { - if (panel.Unread < 11) - sb.Append(new Rune('➀' + (panel.Unread-1))); - else - sb.Append(new Rune(0x2639)); // ☹ - sb.Append(' '); - } - - if (info.Antag && info.ActiveThisRound) - sb.Append(new Rune(0x1F5E1)); // 🗡 - - if (info.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold))) - sb.Append(new Rune(0x23F2)); // ⏲ - - sb.AppendFormat("\"{0}\"", text); - - return sb.ToString(); - }; + ChannelSelector.OverrideText += (info, _) => FormatTabTitle(info); ChannelSelector.Comparison = (a, b) => { @@ -166,11 +137,10 @@ namespace Content.Client.Administration.UI.Bwoink ChannelSelector.PopulateList(); } - public void SelectChannel(NetUserId channel) { if (!ChannelSelector.PlayerInfo.TryFirstOrDefault( - i => i.SessionId == channel, out var info)) + i => i.SessionId == channel, out var info)) return; // clear filter if we're trying to select a channel for a player that isn't currently filtered @@ -208,33 +178,33 @@ namespace Content.Client.Administration.UI.Bwoink Follow.Disabled = !Follow.Visible || disabled; } - private string FormatTabTitle(ItemList.Item li, PlayerInfo? pl = default) + private string FormatTabTitle(PlayerInfo info) { - pl ??= (PlayerInfo) li.Metadata!; var sb = new StringBuilder(); - sb.Append(pl.Connected ? '●' : '○'); + sb.Append(info.Connected ? '●' : + info.ActiveThisRound ? '○' : '·' + ); + sb.Append(' '); - if (AHelpHelper.TryGetChannel(pl.SessionId, out var panel) && panel.Unread > 0) + if (AHelpHelper.TryGetChannel(info.SessionId, out var panel) && panel.Unread > 0) { - if (panel.Unread < 11) - sb.Append(new Rune('➀' + (panel.Unread-1))); - else - sb.Append(new Rune(0x2639)); // ☹ + sb.Append(panel.Unread < 11 ? new Rune('➀' + (panel.Unread - 1)) : new Rune(0x2639)); // ☹ + sb.Append(' '); } - if (pl.Antag) + if (info.Antag) sb.Append(new Rune(0x1F5E1)); // 🗡 - if (pl.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold))) + if (info.OverallPlaytime <= TimeSpan.FromSeconds(_cfg.GetCVar(CCVars.NewPlayerThreshold))) sb.Append(new Rune(0x23F2)); // ⏲ - sb.AppendFormat("\"{0}\"", pl.CharacterName); + sb.Append($"\"{info.CharacterName}\""); - if (pl.IdentityName != pl.CharacterName && pl.IdentityName != string.Empty) - sb.Append(' ').AppendFormat("[{0}]", pl.IdentityName); + if (info.IdentityName != info.CharacterName && info.IdentityName != string.Empty) + sb.Append(' ').Append($"[{info.IdentityName}]"); - sb.Append(' ').Append(pl.Username); + sb.Append(' ').Append(info.Username); return sb.ToString(); } @@ -257,4 +227,4 @@ namespace Content.Client.Administration.UI.Bwoink UpdateButtons(); } } -} +} \ No newline at end of file diff --git a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs index e02b22f4a2..7366fc5633 100644 --- a/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs @@ -1,10 +1,12 @@ using System.Linq; using Content.Client.Administration.Systems; +using Content.Client.Stylesheets; using Content.Client.UserInterface.Controls; using Content.Client.Verbs.UI; using Content.Shared.Administration; using Robust.Client.AutoGenerated; using Robust.Client.Graphics; +using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; @@ -26,15 +28,18 @@ namespace Content.Client.Administration.UI.CustomControls public Func? OverrideText; public Comparison? Comparison; - private IEntityManager _entManager; - private IUserInterfaceManager _uiManager; + private readonly IEntityManager _entManager; + private readonly IUserInterfaceManager _uiManager; private PlayerInfo? _selectedPlayer; + private readonly Font _fontOverride; + public PlayerListControl() { _entManager = IoCManager.Resolve(); _uiManager = IoCManager.Resolve(); + _fontOverride = IoCManager.Resolve().NotoStack(size: 12); _adminSystem = _entManager.System(); RobustXamlLoader.Load(this); // Fill the Option data @@ -137,6 +142,7 @@ namespace Content.Client.Administration.UI.CustomControls new Label { ClipText = true, + FontOverride = _fontOverride, Text = GetText(info) } } diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs index 821e4a8993..77197aa8ea 100644 --- a/Content.Client/Popups/PopupSystem.cs +++ b/Content.Client/Popups/PopupSystem.cs @@ -11,6 +11,7 @@ using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Shared.Configuration; using Robust.Shared.Map; +using Robust.Shared.Network; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Replays; @@ -30,6 +31,7 @@ namespace Content.Client.Popups [Dependency] private readonly IUserInterfaceManager _uiManager = default!; [Dependency] private readonly IReplayRecordingManager _replayRecording = default!; [Dependency] private readonly IChatManager _chatManager = default!; + [Dependency] private readonly IClientNetManager _clientNet = default!; public IReadOnlyList WorldLabels => _aliveWorldLabels; public IReadOnlyList CursorLabels => _aliveCursorLabels; @@ -99,12 +101,14 @@ namespace Content.Client.Popups { PopupType.LargeCaution, "15" } }; - var fontsize = fontSizeDict.ContainsKey(type) ? fontSizeDict[type] : "10"; - var fontcolor = (type == PopupType.LargeCaution || type == PopupType.MediumCaution || type == PopupType.SmallCaution) ? "c62828" : "aeabc4"; + var fontsize = fontSizeDict.GetValueOrDefault(type, "10"); + var fontcolor = type is PopupType.LargeCaution or PopupType.MediumCaution or PopupType.SmallCaution ? "c62828" : "aeabc4"; if (isLogging) { - _chatManager.SendMessage($"notice [font size={fontsize}][color=#{fontcolor}]{message}[/color][/font]", ChatSelectChannel.Console); + var wrappedMEssage = $"[font size={fontsize}][color=#{fontcolor}]{message}[/color][/font]"; + var chatMsg = new ChatMessage(ChatChannel.Emotes, message, wrappedMEssage, GetNetEntity(EntityUid.Invalid), null); + _clientNet.DispatchLocalNetMessage(new MsgChatMessage { Message = chatMsg }); } } diff --git a/Content.Server/_White/SelfHeal/SelfHealSystem.cs b/Content.Server/_White/SelfHeal/SelfHealSystem.cs index 14c0bd9132..853d01c4b6 100644 --- a/Content.Server/_White/SelfHeal/SelfHealSystem.cs +++ b/Content.Server/_White/SelfHeal/SelfHealSystem.cs @@ -72,7 +72,7 @@ public sealed class SelfHealSystem: EntitySystem // Logic to determine the whether or not to repeat the healing action args.Repeat = (HasDamage(component, healing) && !dontRepeat); if (!args.Repeat && !dontRepeat) - _popupSystem.PopupEntity(Loc.GetString("self-heal-finished-using", ("verb", Loc.GetString("self-heal-lick")), ("name", uid)), uid, args.User); + _popupSystem.PopupEntity(Loc.GetString("self-heal-finished-using", ("name", uid)), uid, args.User); args.Handled = true; @@ -90,8 +90,8 @@ public sealed class SelfHealSystem: EntitySystem var targetString = EntityManager.ToPrettyString(uid); var healMessage = uid != args.User - ? $"{userString:user} healed {targetString:target} for {total:damage} with {Loc.GetString("self-heal-lick")}" - : $"{userString:user} healed themselves for {total:damage} with {Loc.GetString("self-heal-lick")}"; + ? $"{userString:user} healed {targetString:target} for {total:damage} by licking" + : $"{userString:user} healed themselves for {total:damage} by licking"; _adminLogger.Add(LogType.Healed, $"{healMessage}"); if (TryComp(args.User, out var selfHealComponent)) @@ -100,7 +100,7 @@ public sealed class SelfHealSystem: EntitySystem var audioParams = new AudioParams().WithVariation(2f).WithVolume(-5f); _audio.PlayPvs(audio, args.User, audioParams); - _popupSystem.PopupEntity(Loc.GetString("self-heal-using-other", ("name", uid), ("verb", Loc.GetString("self-heal-lick"))), uid); + _popupSystem.PopupEntity(Loc.GetString("self-heal-using-other", ("user", args.Args.User), ("target", uid)), uid); } } @@ -114,8 +114,7 @@ public sealed class SelfHealSystem: EntitySystem if (!HasDamage(targetDamage, component)) { - var popup = Loc.GetString("self-heal-cant-use", ("verb", Loc.GetString("self-heal-lick")), - ("name", target)); + var popup = Loc.GetString("self-heal-cant-use", ("name", target)); _popupSystem.PopupEntity(popup, user, user); return false; } @@ -128,7 +127,7 @@ public sealed class SelfHealSystem: EntitySystem EntityManager.TryGetComponent(blockedClothing, out var blocker) && blocker.Enabled) { - var popup = Loc.GetString("self-heal-cant-use-clothing", ("verb", Loc.GetString("self-heal-lick")), ("clothing", blockedClothing)); + var popup = Loc.GetString("self-heal-cant-use-clothing", ("clothing", blockedClothing)); _popupSystem.PopupEntity(popup, user, user); return false; } @@ -141,7 +140,7 @@ public sealed class SelfHealSystem: EntitySystem { if (_inventorySystem.TryGetSlotEntity(target, clothing, out var blockedClothing)) { - var popup = Loc.GetString("self-heal-cant-use-clothing-other", ("verb", Loc.GetString("self-heal-lick")), ("name", target), ("clothing", blockedClothing)); + var popup = Loc.GetString("self-heal-cant-use-clothing-other", ("name", target), ("clothing", blockedClothing)); _popupSystem.PopupEntity(popup, user, user); return false; } diff --git a/Resources/Locale/en-US/medical/components/self-healing-component.ftl b/Resources/Locale/en-US/medical/components/self-healing-component.ftl index e654d44cbf..751f084b8f 100644 --- a/Resources/Locale/en-US/medical/components/self-healing-component.ftl +++ b/Resources/Locale/en-US/medical/components/self-healing-component.ftl @@ -1,8 +1,6 @@ -self-heal-finished-using = You have finished {$verb}ing all {$name}`s wounds -self-heal-cant-use = There is no damage you can heal by {$verb}ing {$name} -self-heal-stop-bleeding = They have stopped bleeding -self-heal-lick = lick -self-heal-cant-use-clothing = You cant {$verb}ing yourself while wearing a {$clothing} -self-heal-cant-use-clothing-other = You cant {$verb}ing {$name} while {$name} is wearing a {$clothing} +self-heal-finished-using = You have finished licking all {$name}`s wounds +self-heal-cant-use = There is no damage you can heal by licking {$name} +self-heal-cant-use-clothing = You cant lick yourself while wearing a {$clothing} +self-heal-cant-use-clothing-other = You cant lick {$name} while {$name} is wearing a {$clothing} self-heal-action = Lick the wounds -self-heal-using-other = {$name} have {$verb}ed some of {$name} wounds +self-heal-using-other = {$user} have licked some of {$target} wounds diff --git a/Resources/Locale/ru-RU/medical/components/self-healing-component.ftl b/Resources/Locale/ru-RU/medical/components/self-healing-component.ftl index ec2db16b58..db06a99529 100644 --- a/Resources/Locale/ru-RU/medical/components/self-healing-component.ftl +++ b/Resources/Locale/ru-RU/medical/components/self-healing-component.ftl @@ -1,9 +1,7 @@ -self-heal-finished-using = Вы закончили {$verb} все раны {$name}! -self-heal-cant-use = {$name} не имеет ран, которые вы могли бы {$verb} -self-heal-stop-bleeding = Оно перестало кровоточить -self-heal-lick = вылизывать -self-heal-cant-use-clothing = Вы не можете {$verb}, пока на вас {$clothing} -self-heal-cant-use-clothing-other = Вы не можете {$verb} {$name}, пока {$name} носит {$clothing} +self-heal-finished-using = Вы закончили вылизывать все раны {$name}! +self-heal-cant-use = {$name} не имеет ран, которые вы могли бы вылизать +self-heal-cant-use-clothing = Вы не можете вылизываться, пока на вас {$clothing} +self-heal-cant-use-clothing-other = Вы не можете вылизать {$name}, пока {$name} носит {$clothing} self-heal-action = Зализать раны -self-heal-using-other = {$name} закончил {$verb} часть {$name} ран +self-heal-using-other = {$user} вылизывает часть ран {$target} ent-SelfHealAction = Зализать раны diff --git a/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/structures/doors/secretdoor/secretdoor.ftl b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/structures/doors/secretdoor/secretdoor.ftl new file mode 100644 index 0000000000..fdf5e1336b --- /dev/null +++ b/Resources/Locale/ru-RU/ss14-ru/prototypes/entities/structures/doors/secretdoor/secretdoor.ftl @@ -0,0 +1,10 @@ +ent-BaseSecretDoor = { ent-WallSolid } + .desc = { ent-WallSolid.desc } + .suffix = секретная дверь + +ent-BaseSecretDoorAssembly = каркас секретной двери + .desc = Она открывается, закрывается, и даже может вас раздавить! + +ent-SolidSecretDoor = { ent-BaseSecretDoor } + .desc = { ent-WallSolid.desc } + \ No newline at end of file diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png b/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png index 6518b7245c..e872d82c5d 100644 Binary files a/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png and b/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png differ diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png b/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png index b68b06f10d..198151d903 100644 Binary files a/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png and b/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png differ diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png b/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png index 0bb895b050..96bba25801 100644 Binary files a/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png and b/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png differ diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/open.png b/Resources/Textures/Structures/Doors/secret_door.rsi/open.png index 81862e1ead..7ca06de1ed 100644 Binary files a/Resources/Textures/Structures/Doors/secret_door.rsi/open.png and b/Resources/Textures/Structures/Doors/secret_door.rsi/open.png differ diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png b/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png index 9d14324686..861f6fbbc3 100644 Binary files a/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png and b/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png differ