diff --git a/UncreatedWarfare/Squads/UI/PlayerSquadHUD.cs b/UncreatedWarfare/Squads/UI/PlayerSquadHUD.cs index eeca1350..fa37e8ee 100644 --- a/UncreatedWarfare/Squads/UI/PlayerSquadHUD.cs +++ b/UncreatedWarfare/Squads/UI/PlayerSquadHUD.cs @@ -14,6 +14,7 @@ namespace Uncreated.Warfare.Squads.UI; public class PlayerSquadHUD : UnturnedUI, IEventListener, IEventListener { public UnturnedLabel SquadName { get; } = new UnturnedLabel("PlayerSquadName"); + public UnturnedLabel SquadNumber { get; } = new UnturnedLabel("PlayerSquadName/PlayerSquadNumber"); public UnturnedLabel[] SquadMembers { get; } = ElementPatterns.CreateArray("PlayerSquadMember_{0}", 1, to: 6); public PlayerSquadHUD(AssetConfiguration assetConfig, ILoggerFactory loggerFactory) @@ -37,7 +38,8 @@ private void UpdateForSquad(Squad squad) } private void UpdateForPlayer(WarfarePlayer player, Squad squad) { - SquadName.SetText(player, $"{squad.Name.ToUpper()} {squad.Members.Count}/{Squad.MaxMembers}"); + SquadName.SetText(player, $"{squad.Name} {squad.Members.Count}/{Squad.MaxMembers}"); + SquadNumber.SetText(player, squad.TeamIdentificationNumber.ToString()); for (int i = 0; i < SquadMembers.Length; i++) { UnturnedLabel element = SquadMembers[i]; diff --git a/UncreatedWarfare/Squads/UI/SquadMenuUI.cs b/UncreatedWarfare/Squads/UI/SquadMenuUI.cs index bfab0f24..3f3b6e2a 100644 --- a/UncreatedWarfare/Squads/UI/SquadMenuUI.cs +++ b/UncreatedWarfare/Squads/UI/SquadMenuUI.cs @@ -159,6 +159,7 @@ private void SendSquadDetail(SquadMenuElement element, Squad squad, WarfarePlaye { element.Root.Show(player); element.SquadName.SetText(player, squad.Name); + element.SquadNumber.SetText(player, squad.TeamIdentificationNumber.ToString()); element.MemberCount.SetText(player, $"{squad.Members.Count}/{Squad.MaxMembers}"); element.SquadJoinLeaveButton.Enable(player); @@ -194,6 +195,9 @@ public class SquadMenuElement [Pattern("", Root = true, CleanJoin = '_')] public UnturnedUIElement Root { get; set; } + [Pattern("Number", Mode = FormatMode.Format)] + public UnturnedLabel SquadNumber { get; set; } + [Pattern("Name", Mode = FormatMode.Format)] public UnturnedLabel SquadName { get; set; }