[Fix] Разные фиксы (#161)
* fix: фикс отображений в ахелпе * fix: нотисы в чат больше не отправляют сообщение в консоль * fix: исправлена текстура секретной двери * fix: ошибки перевода при вылизывании ран
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<PlayerInfo, string, string>? OverrideText;
|
||||
public Comparison<PlayerInfo>? 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<IEntityManager>();
|
||||
_uiManager = IoCManager.Resolve<IUserInterfaceManager>();
|
||||
_fontOverride = IoCManager.Resolve<IResourceCache>().NotoStack(size: 12);
|
||||
_adminSystem = _entManager.System<AdminSystem>();
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
|
||||
public IReadOnlyList<CursorPopupLabel> 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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<SelfHealComponent>(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<IngestionBlockerComponent>(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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = Зализать раны
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
ent-BaseSecretDoor = { ent-WallSolid }
|
||||
.desc = { ent-WallSolid.desc }
|
||||
.suffix = секретная дверь
|
||||
|
||||
ent-BaseSecretDoorAssembly = каркас секретной двери
|
||||
.desc = Она открывается, закрывается, и даже может вас раздавить!
|
||||
|
||||
ent-SolidSecretDoor = { ent-BaseSecretDoor }
|
||||
.desc = { ent-WallSolid.desc }
|
||||
|
||||
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 859 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 2.9 KiB |