Add player random faction info in the objectives panel

This commit is contained in:
Ivaylo Draganov
2020-12-22 21:56:19 +02:00
committed by Paul Chote
parent a68a91bb39
commit ff60540fac

View File

@@ -101,7 +101,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (player == null || player.RelationshipWith(pp) == PlayerRelationship.Ally || player.WinState != WinState.Undefined) if (player == null || player.RelationshipWith(pp) == PlayerRelationship.Ally || player.WinState != WinState.Undefined)
{ {
flag.GetImageName = () => pp.Faction.InternalName; flag.GetImageName = () => pp.Faction.InternalName;
item.Get<LabelWidget>("FACTION").GetText = () => pp.Faction.Name; var factionName = pp.Faction.Name != pp.DisplayFaction.Name ? "{0} ({1})".F(pp.DisplayFaction.Name, pp.Faction.Name) : pp.Faction.Name;
item.Get<LabelWidget>("FACTION").GetText = () => factionName;
} }
else else
{ {