Update radio prefix parsing (#13777)

This commit is contained in:
Leon Friedrich
2023-02-19 06:27:56 +13:00
committed by GitHub
parent 63a0c76ecc
commit 75a559fa55
32 changed files with 659 additions and 606 deletions

View File

@@ -1,4 +1,4 @@
using Content.Client.Stylesheets;
using Content.Client.Stylesheets;
using Content.Shared.Chat;
using Robust.Client.UserInterface.Controls;
@@ -14,8 +14,12 @@ public sealed class ChannelSelectorItemButton : Button
{
Channel = selector;
AddStyleClass(StyleNano.StyleClassChatChannelSelectorButton);
Text = ChatUIController.GetChannelSelectorName(selector);
Text = ChannelSelectorButton.ChannelSelectorName(selector);
var prefix = ChatUIController.ChannelPrefixes[selector];
if (prefix != default) Text = Loc.GetString("hud-chatbox-select-name-prefixed", ("name", Text), ("prefix", prefix));
if (prefix != default)
Text = Loc.GetString("hud-chatbox-select-name-prefixed", ("name", Text), ("prefix", prefix));
}
}