Faction Test 100.13.0.0
This commit is contained in:
@@ -66,9 +66,20 @@ namespace Barotrauma.Networking
|
||||
};
|
||||
|
||||
var addressOrAccountId = bannedPlayer.AddressOrAccountId;
|
||||
GUITextBlock textBlock = new GUITextBlock(
|
||||
new RectTransform(new Vector2(0.5f, 1.0f), topArea.RectTransform),
|
||||
bannedPlayer.Name + " (" + addressOrAccountId + ")") { CanBeFocused = true };
|
||||
|
||||
string nameText = bannedPlayer.Name;
|
||||
if (addressOrAccountId.TryCast(out Address address))
|
||||
{
|
||||
nameText += $" ({address.StringRepresentation})";
|
||||
}
|
||||
else if (addressOrAccountId.TryCast(out AccountId accountId))
|
||||
{
|
||||
nameText += $" ({accountId.StringRepresentation})";
|
||||
}
|
||||
GUITextBlock textBlock = new GUITextBlock(new RectTransform(new Vector2(0.5f, 1.0f), topArea.RectTransform), nameText)
|
||||
{
|
||||
CanBeFocused = true
|
||||
};
|
||||
textBlock.RectTransform.MinSize = new Point(
|
||||
(int)textBlock.Font.MeasureString(textBlock.Text.SanitizedValue).X, 0);
|
||||
|
||||
@@ -106,7 +117,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
private bool RemoveBan(GUIButton button, object obj)
|
||||
{
|
||||
if (!(obj is BannedPlayer banned)) { return false; }
|
||||
if (obj is not BannedPlayer banned) { return false; }
|
||||
|
||||
localRemovedBans.Add(banned.UniqueIdentifier);
|
||||
RecreateBanFrame();
|
||||
|
||||
Reference in New Issue
Block a user