4 [
Attribute(
"1",
desc:
"If true gets faction flag of factionOther, else gets flag of Player faction. Not if winning faction is true but there are multiple factions then the given Image in optional params is used instead!")]
5 protected bool m_bGetWinningFactionImage;
7 [
Attribute(
"1",
desc:
"If true gets faction name of factionOther to be subtitle param, else gets name of Player faction")]
8 protected bool m_bGetWinningSubtitleParam;
11 override ResourceName GetImage(
Faction factionPlayer, array<Faction> factionsOther)
15 if (m_bGetWinningFactionImage)
17 if (factionsOther.Count() == 1)
21 return scrFaction.GetFactionFlag();
23 return factionsOther[0].GetUIInfo().GetIconPath();
25 else if (factionPlayer && factionsOther.Contains(factionPlayer))
29 return scrFaction.GetFactionFlag();
31 return factionPlayer.GetUIInfo().GetIconPath();
33 else if (HasOptionalParams())
35 return m_OptionalParams.m_sImageTexture;
38 else if (factionPlayer)
42 return scrFaction.GetFactionFlag();
44 return factionPlayer.GetUIInfo().GetIconPath();
46 else if (HasOptionalParams())
48 return m_OptionalParams.m_sImageTexture;
55 override ResourceName GetIcon(
Faction factionPlayer, array<Faction> factionsOther)
59 if (m_bGetWinningFactionImage)
61 if (factionsOther.Count() == 1)
63 return factionsOther[0].GetUIInfo().GetIconPath();
65 else if (factionPlayer && factionsOther.Contains(factionPlayer))
67 return factionPlayer.GetUIInfo().GetIconPath();
69 else if (HasOptionalParams())
71 return m_OptionalParams.m_sIcon;
74 else if (factionPlayer)
76 return factionPlayer.GetUIInfo().GetIconPath();
78 else if (HasOptionalParams())
80 return m_OptionalParams.m_sIcon;
88 override string GetSubtitleParam(
Faction factionPlayer, array<Faction> factionsOther)
90 if (m_bGetWinningFactionImage)
92 if (factionsOther.Count() == 1)
94 return factionsOther[0].GetFactionName();
96 else if (factionPlayer && factionsOther.Contains(factionPlayer))
98 return factionPlayer.GetFactionName();
100 else if (HasOptionalParams())
102 return m_OptionalParams.m_sSubtitleParam;
105 else if (factionPlayer)
107 return factionPlayer.GetFactionName();
109 else if (HasOptionalParams())
111 return m_OptionalParams.m_sSubtitleParam;