Merge pull request #8721 from penev92/bleed_rename

Some more Country -> Faction renaming
This commit is contained in:
Oliver Brakmann
2015-07-25 17:10:35 +02:00
34 changed files with 176 additions and 155 deletions

View File

@@ -103,13 +103,13 @@ namespace OpenRA
} }
} }
// Allows maps / transformations to specify the race variant of an actor. // Allows maps / transformations to specify the faction variant of an actor.
public class RaceInit : IActorInit<string> public class FactionInit : IActorInit<string>
{ {
[FieldFromYamlKey] public readonly string Race; [FieldFromYamlKey] public readonly string Faction;
public RaceInit() { } public FactionInit() { }
public RaceInit(string race) { Race = race; } public FactionInit(string faction) { Faction = faction; }
public string Value(World world) { return Race; } public string Value(World world) { return Faction; }
} }
} }

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Traits
{ {
this.info = info; this.info = info;
var self = init.Self; var self = init.Self;
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : self.Owner.Faction.InternalName; var race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : self.Owner.Faction.InternalName;
quantizedFacings = Exts.Lazy(() => quantizedFacings = Exts.Lazy(() =>
{ {

View File

@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Activities
init.Add(new SkipMakeAnimsInit()); init.Add(new SkipMakeAnimsInit());
if (Race != null) if (Race != null)
init.Add(new RaceInit(Race)); init.Add(new FactionInit(Race));
var health = self.TraitOrDefault<Health>(); var health = self.TraitOrDefault<Health>();
if (health != null) if (health != null)

View File

@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Widgets
td.Add(new FacingInit(facing)); td.Add(new FacingInit(facing));
td.Add(new TurretFacingInit(facing)); td.Add(new TurretFacingInit(facing));
td.Add(new OwnerInit(owner.Name)); td.Add(new OwnerInit(owner.Name));
td.Add(new RaceInit(owner.Faction)); td.Add(new FactionInit(owner.Faction));
preview.SetPreview(actor, td); preview.SetPreview(actor, td);
var ios = actor.Traits.GetOrDefault<IOccupySpaceInfo>(); var ios = actor.Traits.GetOrDefault<IOccupySpaceInfo>();

View File

@@ -565,11 +565,11 @@
<Compile Include="Widgets\Logic\ButtonTooltipLogic.cs" /> <Compile Include="Widgets\Logic\ButtonTooltipLogic.cs" />
<Compile Include="Widgets\Logic\ColorPickerLogic.cs" /> <Compile Include="Widgets\Logic\ColorPickerLogic.cs" />
<Compile Include="Widgets\Logic\ConnectionLogic.cs" /> <Compile Include="Widgets\Logic\ConnectionLogic.cs" />
<Compile Include="Widgets\Logic\CountryTooltipLogic.cs" /> <Compile Include="Widgets\Logic\FactionTooltipLogic.cs" />
<Compile Include="Widgets\Logic\CreditsLogic.cs" /> <Compile Include="Widgets\Logic\CreditsLogic.cs" />
<Compile Include="Widgets\Logic\DirectConnectLogic.cs" /> <Compile Include="Widgets\Logic\DirectConnectLogic.cs" />
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" /> <Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\AddRaceSuffixLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\AddFactionSuffixLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ControlGroupLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\ControlGroupLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\DebugMenuLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\DebugMenuLogic.cs" />

View File

@@ -170,7 +170,7 @@ namespace OpenRA.Mods.Common.Orders
{ {
var td = new TypeDictionary() var td = new TypeDictionary()
{ {
new RaceInit(race), new FactionInit(race),
new OwnerInit(producer.Owner), new OwnerInit(producer.Owner),
new HideBibPreviewInit() new HideBibPreviewInit()
}; };

View File

@@ -30,8 +30,18 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("The player's color.")] [Desc("The player's color.")]
public HSLColor Color { get { return Player.Color; } } public HSLColor Color { get { return Player.Color; } }
[Desc("The player's race.")] [Desc("The player's race. (DEPRECATED! Use the `Faction` property.)")]
public string Race { get { return Player.PlayerReference.Faction; } } public string Race
{
get
{
Game.Debug("The property `PlayerProperties.Race` is deprecated! Use `PlayerProperties.Faction` instead!");
return Player.PlayerReference.Faction;
}
}
[Desc("The player's faction.")]
public string Faction { get { return Player.PlayerReference.Faction; } }
[Desc("The player's spawnpoint ID.")] [Desc("The player's spawnpoint ID.")]
public int Spawn { get { return Player.SpawnPoint; } } public int Spawn { get { return Player.SpawnPoint; } }

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
new LocationInit(t), new LocationInit(t),
new OwnerInit(order.Player), new OwnerInit(order.Player),
new RaceInit(race) new FactionInit(race)
}); });
if (playSounds) if (playSounds)
@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
new LocationInit(order.TargetLocation), new LocationInit(order.TargetLocation),
new OwnerInit(order.Player), new OwnerInit(order.Player),
new RaceInit(race), new FactionInit(race),
}); });
foreach (var s in buildingInfo.BuildSounds) foreach (var s in buildingInfo.BuildSounds)

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common.Traits
playerPower = playerActor.Trait<PowerManager>(); playerPower = playerActor.Trait<PowerManager>();
developerMode = playerActor.Trait<DeveloperMode>(); developerMode = playerActor.Trait<DeveloperMode>();
Race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : self.Owner.Faction.InternalName; Race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : self.Owner.Faction.InternalName;
Enabled = !info.Race.Any() || info.Race.Contains(Race); Enabled = !info.Race.Any() || info.Race.Contains(Race);
CacheProduceables(playerActor); CacheProduceables(playerActor);

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
if (string.IsNullOrEmpty(prerequisite)) if (string.IsNullOrEmpty(prerequisite))
prerequisite = init.Self.Info.Name; prerequisite = init.Self.Info.Name;
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Faction.InternalName; var race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
Update(init.Self.Owner, race); Update(init.Self.Owner, race);
} }

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
{ {
Info = info; Info = info;
rp = Exts.Lazy(() => init.Self.IsDead ? null : init.Self.TraitOrDefault<RallyPoint>()); rp = Exts.Lazy(() => init.Self.IsDead ? null : init.Self.TraitOrDefault<RallyPoint>());
Race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Faction.InternalName; Race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
} }
public void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo, string raceVariant) public void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo, string raceVariant)
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Traits
}; };
if (raceVariant != null) if (raceVariant != null)
td.Add(new RaceInit(raceVariant)); td.Add(new FactionInit(raceVariant));
var newUnit = self.World.CreateActor(producee.Name, td); var newUnit = self.World.CreateActor(producee.Name, td);

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init) public IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init)
{ {
var sequenceProvider = init.World.Map.SequenceProvider; var sequenceProvider = init.World.Map.SequenceProvider;
var race = init.Get<RaceInit, string>(); var race = init.Get<FactionInit, string>();
var ownerName = init.Get<OwnerInit>().PlayerName; var ownerName = init.Get<OwnerInit>().PlayerName;
var image = GetImage(init.Actor, sequenceProvider, race); var image = GetImage(init.Actor, sequenceProvider, race);
var palette = init.WorldRenderer.Palette(Palette ?? PlayerPalette + ownerName); var palette = init.WorldRenderer.Palette(Palette ?? PlayerPalette + ownerName);
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Traits
public RenderSprites(ActorInitializer init, RenderSpritesInfo info) public RenderSprites(ActorInitializer init, RenderSpritesInfo info)
{ {
this.info = info; this.info = info;
race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Faction.InternalName; race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
} }
public string GetImage(Actor self) public string GetImage(Actor self)

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
public virtual IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init) public virtual IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init)
{ {
var body = init.Actor.Traits.Get<BodyOrientationInfo>(); var body = init.Actor.Traits.Get<BodyOrientationInfo>();
var race = init.Get<RaceInit, string>(); var race = init.Get<FactionInit, string>();
var ownerName = init.Get<OwnerInit>().PlayerName; var ownerName = init.Get<OwnerInit>().PlayerName;
var sequenceProvider = init.World.Map.SequenceProvider; var sequenceProvider = init.World.Map.SequenceProvider;
var image = Image ?? init.Actor.Name; var image = Image ?? init.Actor.Name;

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits
self = init.Self; self = init.Self;
this.info = info; this.info = info;
buildingInfo = self.World.Map.Rules.Actors[info.IntoActor].Traits.GetOrDefault<BuildingInfo>(); buildingInfo = self.World.Map.Rules.Actors[info.IntoActor].Traits.GetOrDefault<BuildingInfo>();
race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : self.Owner.Faction.InternalName; race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : self.Owner.Faction.InternalName;
} }
public string VoicePhraseForOrder(Actor self, Order order) public string VoicePhraseForOrder(Actor self, Order order)

View File

@@ -43,8 +43,8 @@ namespace OpenRA.Mods.Common.Traits
this.Owner = owner; this.Owner = owner;
this.worldRenderer = worldRenderer; this.worldRenderer = worldRenderer;
if (!actor.InitDict.Contains<RaceInit>()) if (!actor.InitDict.Contains<FactionInit>())
actor.InitDict.Add(new RaceInit(owner.Faction)); actor.InitDict.Add(new FactionInit(owner.Faction));
if (!actor.InitDict.Contains<OwnerInit>()) if (!actor.InitDict.Contains<OwnerInit>())
actor.InitDict.Add(new OwnerInit(owner.Name)); actor.InitDict.Add(new OwnerInit(owner.Name));
@@ -118,8 +118,8 @@ namespace OpenRA.Mods.Common.Traits
{ {
Func<object, bool> saveInit = init => Func<object, bool> saveInit = init =>
{ {
var race = init as RaceInit; var factionInit = init as FactionInit;
if (race != null && race.Race == Owner.Faction) if (factionInit != null && factionInit.Faction == Owner.Faction)
return false; return false;
// TODO: Other default values will need to be filtered // TODO: Other default values will need to be filtered

View File

@@ -2172,6 +2172,12 @@ namespace OpenRA.Mods.Common.UtilityCommands
ConvertFloatToIntPercentage(ref node.Value.Value); ConvertFloatToIntPercentage(ref node.Value.Value);
} }
if (engineVersion < 20150715)
{
if (node.Key == "Race")
node.Key = "Faction";
}
UpgradeActors(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActors(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var td = new TypeDictionary(); var td = new TypeDictionary();
td.Add(new HideBibPreviewInit()); td.Add(new HideBibPreviewInit());
td.Add(new OwnerInit(world.WorldActor.Owner)); td.Add(new OwnerInit(world.WorldActor.Owner));
td.Add(new RaceInit(world.WorldActor.Owner.PlayerReference.Faction)); td.Add(new FactionInit(world.WorldActor.Owner.PlayerReference.Faction));
if (preview != null) if (preview != null)
preview.SetPreview(actor, td); preview.SetPreview(actor, td);

View File

@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
td.Add(new TurretFacingInit(92)); td.Add(new TurretFacingInit(92));
td.Add(new HideBibPreviewInit()); td.Add(new HideBibPreviewInit());
td.Add(new OwnerInit(selectedOwner.Name)); td.Add(new OwnerInit(selectedOwner.Name));
td.Add(new RaceInit(selectedOwner.Faction)); td.Add(new FactionInit(selectedOwner.Faction));
try try
{ {

View File

@@ -14,10 +14,10 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic namespace OpenRA.Mods.Common.Widgets.Logic
{ {
public class CountryTooltipLogic public class FactionTooltipLogic
{ {
[ObjectCreator.UseCtor] [ObjectCreator.UseCtor]
public CountryTooltipLogic(Widget widget, ButtonWidget button) public FactionTooltipLogic(Widget widget, ButtonWidget button)
{ {
var lines = button.GetTooltipText().Replace("\\n", "\n").Split('\n'); var lines = button.GetTooltipText().Replace("\\n", "\n").Split('\n');

View File

@@ -0,0 +1,39 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class AddFactionSuffixLogic
{
[ObjectCreator.UseCtor]
public AddFactionSuffixLogic(Widget widget, World world)
{
string faction;
if (!ChromeMetrics.TryGet("FactionSuffix-" + world.LocalPlayer.Faction.InternalName, out faction))
faction = world.LocalPlayer.Faction.InternalName;
var suffix = "-" + faction;
var buttonWidget = widget as ButtonWidget;
if (buttonWidget != null)
buttonWidget.Background += suffix;
else
{
var imageWidget = widget as ImageWidget;
if (imageWidget != null)
imageWidget.ImageCollection += suffix;
else
throw new InvalidOperationException("AddFactionSuffixLogic only supports ButtonWidget and ImageWidget");
}
}
}
}

View File

@@ -1,34 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class AddRaceSuffixLogic
{
[ObjectCreator.UseCtor]
public AddRaceSuffixLogic(Widget widget, World world)
{
string race;
if (!ChromeMetrics.TryGet("RaceSuffix-" + world.LocalPlayer.Faction.InternalName, out race))
race = world.LocalPlayer.Faction.InternalName;
var suffix = "-" + race;
if (widget is ButtonWidget)
((ButtonWidget)widget).Background += suffix;
else if (widget is ImageWidget)
((ImageWidget)widget).ImageCollection += suffix;
else
throw new InvalidOperationException("AddRaceSuffixLogic only supports ButtonWidget and ImageWidget");
}
}
}

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
readonly ScrollPanelWidget players; readonly ScrollPanelWidget players;
readonly Dictionary<string, LobbyCountry> countries = new Dictionary<string, LobbyCountry>(); readonly Dictionary<string, LobbyFaction> factions = new Dictionary<string, LobbyFaction>();
readonly ColorPreviewManagerWidget colorPreview; readonly ColorPreviewManagerWidget colorPreview;
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
colorPreview.Color = Game.Settings.Player.Color; colorPreview.Color = Game.Settings.Player.Color;
foreach (var f in modRules.Actors["world"].Traits.WithInterface<FactionInfo>()) foreach (var f in modRules.Actors["world"].Traits.WithInterface<FactionInfo>())
countries.Add(f.InternalName, new LobbyCountry { Selectable = f.Selectable, Name = f.Name, Side = f.Side, Description = f.Description }); factions.Add(f.InternalName, new LobbyFaction { Selectable = f.Selectable, Name = f.Name, Side = f.Side, Description = f.Description });
var gameStarting = false; var gameStarting = false;
Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting || Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting ||
@@ -714,7 +714,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupEditableNameWidget(template, slot, client, orderManager); LobbyUtils.SetupEditableNameWidget(template, slot, client, orderManager);
LobbyUtils.SetupEditableColorWidget(template, slot, client, orderManager, shellmapWorld, colorPreview); LobbyUtils.SetupEditableColorWidget(template, slot, client, orderManager, shellmapWorld, colorPreview);
LobbyUtils.SetupEditableFactionWidget(template, slot, client, orderManager, countries); LobbyUtils.SetupEditableFactionWidget(template, slot, client, orderManager, factions);
LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, Map); LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, Map);
LobbyUtils.SetupEditableSpawnWidget(template, slot, client, orderManager, Map); LobbyUtils.SetupEditableSpawnWidget(template, slot, client, orderManager, Map);
LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager, Map); LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager, Map);
@@ -730,7 +730,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby, LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby,
() => panel = PanelType.Kick, () => panel = PanelType.Players); () => panel = PanelType.Kick, () => panel = PanelType.Players);
LobbyUtils.SetupColorWidget(template, slot, client); LobbyUtils.SetupColorWidget(template, slot, client);
LobbyUtils.SetupFactionWidget(template, slot, client, countries); LobbyUtils.SetupFactionWidget(template, slot, client, factions);
LobbyUtils.SetupTeamWidget(template, slot, client); LobbyUtils.SetupTeamWidget(template, slot, client);
LobbyUtils.SetupSpawnWidget(template, slot, client); LobbyUtils.SetupSpawnWidget(template, slot, client);
LobbyUtils.SetupReadyWidget(template, slot, client); LobbyUtils.SetupReadyWidget(template, slot, client);
@@ -834,7 +834,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
} }
} }
public class LobbyCountry public class LobbyFaction
{ {
public bool Selectable; public bool Selectable;
public string Name; public string Name;

View File

@@ -105,24 +105,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic
} }
public static void ShowRaceDropDown(DropDownButtonWidget dropdown, Session.Client client, public static void ShowRaceDropDown(DropDownButtonWidget dropdown, Session.Client client,
OrderManager orderManager, Dictionary<string, LobbyCountry> countries) OrderManager orderManager, Dictionary<string, LobbyFaction> factions)
{ {
Func<string, ScrollItemWidget, ScrollItemWidget> setupItem = (race, itemTemplate) => Func<string, ScrollItemWidget, ScrollItemWidget> setupItem = (race, itemTemplate) =>
{ {
var item = ScrollItemWidget.Setup(itemTemplate, var item = ScrollItemWidget.Setup(itemTemplate,
() => client.Race == race, () => client.Race == race,
() => orderManager.IssueOrder(Order.Command("race {0} {1}".F(client.Index, race)))); () => orderManager.IssueOrder(Order.Command("race {0} {1}".F(client.Index, race))));
var country = countries[race]; var faction = factions[race];
item.Get<LabelWidget>("LABEL").GetText = () => country.Name; item.Get<LabelWidget>("LABEL").GetText = () => faction.Name;
var flag = item.Get<ImageWidget>("FLAG"); var flag = item.Get<ImageWidget>("FLAG");
flag.GetImageCollection = () => "flags"; flag.GetImageCollection = () => "flags";
flag.GetImageName = () => race; flag.GetImageName = () => race;
item.GetTooltipText = () => country.Description; item.GetTooltipText = () => faction.Description;
return item; return item;
}; };
var options = countries.Where(c => c.Value.Selectable).GroupBy(c => c.Value.Side) var options = factions.Where(f => f.Value.Selectable).GroupBy(f => f.Value.Side)
.ToDictionary(g => g.Key ?? "", g => g.Select(c => c.Key)); .ToDictionary(g => g.Key ?? "", g => g.Select(f => f.Key));
dropdown.ShowDropDown("RACE_DROPDOWN_TEMPLATE", 150, options, setupItem); dropdown.ShowDropDown("RACE_DROPDOWN_TEMPLATE", 150, options, setupItem);
} }
@@ -395,21 +395,21 @@ namespace OpenRA.Mods.Common.Widgets.Logic
} }
public static void SetupEditableFactionWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, public static void SetupEditableFactionWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager,
Dictionary<string, LobbyCountry> countries) Dictionary<string, LobbyFaction> factions)
{ {
var dropdown = parent.Get<DropDownButtonWidget>("FACTION"); var dropdown = parent.Get<DropDownButtonWidget>("FACTION");
dropdown.IsDisabled = () => s.LockRace || orderManager.LocalClient.IsReady; dropdown.IsDisabled = () => s.LockRace || orderManager.LocalClient.IsReady;
dropdown.OnMouseDown = _ => ShowRaceDropDown(dropdown, c, orderManager, countries); dropdown.OnMouseDown = _ => ShowRaceDropDown(dropdown, c, orderManager, factions);
var factionDescription = countries[c.Race].Description; var factionDescription = factions[c.Race].Description;
dropdown.GetTooltipText = () => factionDescription; dropdown.GetTooltipText = () => factionDescription;
SetupFactionWidget(dropdown, s, c, countries); SetupFactionWidget(dropdown, s, c, factions);
} }
public static void SetupFactionWidget(Widget parent, Session.Slot s, Session.Client c, public static void SetupFactionWidget(Widget parent, Session.Slot s, Session.Client c,
Dictionary<string, LobbyCountry> countries) Dictionary<string, LobbyFaction> factions)
{ {
var factionName = parent.Get<LabelWidget>("FACTIONNAME"); var factionName = parent.Get<LabelWidget>("FACTIONNAME");
factionName.GetText = () => countries[c.Race].Name; factionName.GetText = () => factions[c.Race].Name;
var factionFlag = parent.Get<ImageWidget>("FACTIONFLAG"); var factionFlag = parent.Get<ImageWidget>("FACTIONFLAG");
factionFlag.GetImageName = () => c.Race; factionFlag.GetImageName = () => c.Race;
factionFlag.GetImageCollection = () => "flags"; factionFlag.GetImageCollection = () => "flags";

View File

@@ -50,7 +50,7 @@ namespace OpenRA.Mods.D2k.Traits
}; };
if (raceVariant != null) if (raceVariant != null)
td.Add(new RaceInit(raceVariant)); td.Add(new FactionInit(raceVariant));
var newUnit = self.World.CreateActor(producee.Name, td); var newUnit = self.World.CreateActor(producee.Name, td);

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA.Traits
{ {
this.info = info; this.info = info;
production = init.Self.Trait<Production>(); production = init.Self.Trait<Production>();
race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Faction.InternalName; race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
} }
public void UnitProducedByOther(Actor self, Actor producer, Actor produced) public void UnitProducedByOther(Actor self, Actor producer, Actor produced)

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Traits
{ {
this.info = info; this.info = info;
race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Faction.InternalName; race = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
} }
public void Killed(Actor self, AttackInfo e) public void Killed(Actor self, AttackInfo e)
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA.Traits
new LocationInit(self.Location), new LocationInit(self.Location),
new CenterPositionInit(self.CenterPosition), new CenterPositionInit(self.CenterPosition),
new OwnerInit(self.Owner), new OwnerInit(self.Owner),
new RaceInit(race), new FactionInit(race),
new SkipMakeAnimsInit() new SkipMakeAnimsInit()
}; };

View File

@@ -190,7 +190,7 @@ Background@CLIENT_TOOLTIP:
Font: TinyBold Font: TinyBold
Background@FACTION_DESCRIPTION_TOOLTIP: Background@FACTION_DESCRIPTION_TOOLTIP:
Logic: CountryTooltipLogic Logic: FactionTooltipLogic
Background: panel-black Background: panel-black
Children: Children:
Label@HEADER: Label@HEADER:

View File

@@ -149,7 +149,7 @@ Container@PLAYER_WIDGETS:
Children: Children:
LogicTicker@RADAR_TICKER: LogicTicker@RADAR_TICKER:
Image@INSIGNIA: Image@INSIGNIA:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 60 X: 60
Y: 75 Y: 75
ImageCollection: radar ImageCollection: radar

View File

@@ -198,7 +198,7 @@ Background@SUPPORT_POWER_TOOLTIP:
VAlign: Top VAlign: Top
Background@FACTION_DESCRIPTION_TOOLTIP: Background@FACTION_DESCRIPTION_TOOLTIP:
Logic: CountryTooltipLogic Logic: FactionTooltipLogic
Background: dialog3 Background: dialog3
Children: Children:
Label@HEADER: Label@HEADER:

View File

@@ -17,7 +17,7 @@ Container@PLAYER_WIDGETS:
Container@PALETTE_FOREGROUND: Container@PALETTE_FOREGROUND:
Children: Children:
Image@ICON_TEMPLATE: Image@ICON_TEMPLATE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X:0-2 X:0-2
Y:0-2 Y:0-2
Width: 62 Width: 62
@@ -30,7 +30,7 @@ Container@PLAYER_WIDGETS:
Y: 10 Y: 10
Order: Descending Order: Descending
Image@SIDEBAR_BACKGROUND_TOP: Image@SIDEBAR_BACKGROUND_TOP:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: WINDOW_RIGHT - 250 X: WINDOW_RIGHT - 250
Y: 10 Y: 10
Width: 238 Width: 238
@@ -45,7 +45,7 @@ Container@PLAYER_WIDGETS:
Y: 7 Y: 7
Children: Children:
Button@BEACON_BUTTON: Button@BEACON_BUTTON:
Logic: BeaconOrderButtonLogic, AddRaceSuffixLogic Logic: BeaconOrderButtonLogic, AddFactionSuffixLogic
Width: 28 Width: 28
Height: 28 Height: 28
Background: sidebar-button Background: sidebar-button
@@ -58,7 +58,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: order-icons ImageCollection: order-icons
Button@SELL_BUTTON: Button@SELL_BUTTON:
Logic: SellOrderButtonLogic, AddRaceSuffixLogic Logic: SellOrderButtonLogic, AddFactionSuffixLogic
X: 32 X: 32
Width: 28 Width: 28
Height: 28 Height: 28
@@ -72,7 +72,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: order-icons ImageCollection: order-icons
Button@POWER_BUTTON: Button@POWER_BUTTON:
Logic: PowerdownOrderButtonLogic, AddRaceSuffixLogic Logic: PowerdownOrderButtonLogic, AddFactionSuffixLogic
X: 64 X: 64
Width: 28 Width: 28
Height: 28 Height: 28
@@ -86,7 +86,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: order-icons ImageCollection: order-icons
Button@REPAIR_BUTTON: Button@REPAIR_BUTTON:
Logic: RepairOrderButtonLogic, AddRaceSuffixLogic Logic: RepairOrderButtonLogic, AddFactionSuffixLogic
X: 96 X: 96
Width: 28 Width: 28
Height: 28 Height: 28
@@ -100,7 +100,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: order-icons ImageCollection: order-icons
MenuButton@DEBUG_BUTTON: MenuButton@DEBUG_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Key: escape Shift Key: escape Shift
X: 128 X: 128
Width: 28 Width: 28
@@ -116,7 +116,7 @@ Container@PLAYER_WIDGETS:
ImageCollection: order-icons ImageCollection: order-icons
ImageName: debug ImageName: debug
MenuButton@DIPLOMACY_BUTTON: MenuButton@DIPLOMACY_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
MenuContainer: INGAME_DIPLOMACY_BG MenuContainer: INGAME_DIPLOMACY_BG
HideIngameUI: false HideIngameUI: false
Pause: false Pause: false
@@ -135,7 +135,7 @@ Container@PLAYER_WIDGETS:
ImageCollection: order-icons ImageCollection: order-icons
ImageName: diplomacy ImageName: diplomacy
MenuButton@OPTIONS_BUTTON: MenuButton@OPTIONS_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Key: escape Key: escape
X: 192 X: 192
Width: 28 Width: 28
@@ -217,14 +217,14 @@ Container@PLAYER_WIDGETS:
Container@PALETTE_BACKGROUND: Container@PALETTE_BACKGROUND:
Children: Children:
Image@ROW_TEMPLATE: Image@ROW_TEMPLATE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 238 Width: 238
Height: 47 Height: 47
ClickThrough: false ClickThrough: false
ImageCollection: sidebar ImageCollection: sidebar
ImageName: background-iconrow ImageName: background-iconrow
Image@BOTTOM_CAP: Image@BOTTOM_CAP:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 238 Width: 238
Height: 8 Height: 8
ClickThrough: false ClickThrough: false
@@ -257,7 +257,7 @@ Container@PLAYER_WIDGETS:
Height: 240 Height: 240
Children: Children:
ProductionTypeButton@BUILDING: ProductionTypeButton@BUILDING:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 28 Width: 28
Height: 28 Height: 28
VisualHeight: 0 VisualHeight: 0
@@ -272,7 +272,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@DEFENSE: ProductionTypeButton@DEFENSE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 31 Y: 31
Width: 28 Width: 28
Height: 28 Height: 28
@@ -288,7 +288,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@INFANTRY: ProductionTypeButton@INFANTRY:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 62 Y: 62
Width: 28 Width: 28
Height: 28 Height: 28
@@ -304,7 +304,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@VEHICLE: ProductionTypeButton@VEHICLE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 93 Y: 93
Width: 28 Width: 28
Height: 28 Height: 28
@@ -320,7 +320,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@AIRCRAFT: ProductionTypeButton@AIRCRAFT:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 124 Y: 124
Width: 28 Width: 28
Height: 28 Height: 28
@@ -336,7 +336,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@NAVAL: ProductionTypeButton@NAVAL:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 155 Y: 155
Width: 28 Width: 28
Height: 28 Height: 28
@@ -352,7 +352,7 @@ Container@PLAYER_WIDGETS:
Y: 6 Y: 6
ImageCollection: production-icons ImageCollection: production-icons
Button@SCROLL_UP_BUTTON: Button@SCROLL_UP_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 186 Y: 186
Width: 28 Width: 28
Height: 22 Height: 22
@@ -367,7 +367,7 @@ Container@PLAYER_WIDGETS:
ImageCollection: scrollbar ImageCollection: scrollbar
ImageName: up_arrow ImageName: up_arrow
Button@SCROLL_DOWN_BUTTON: Button@SCROLL_DOWN_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Y: 211 Y: 211
Width: 28 Width: 28
Height: 22 Height: 22

View File

@@ -198,7 +198,7 @@ Background@SUPPORT_POWER_TOOLTIP:
VAlign: Top VAlign: Top
Background@FACTION_DESCRIPTION_TOOLTIP: Background@FACTION_DESCRIPTION_TOOLTIP:
Logic: CountryTooltipLogic Logic: FactionTooltipLogic
Background: dialog4 Background: dialog4
Children: Children:
Label@HEADER: Label@HEADER:

View File

@@ -25,13 +25,13 @@ Metrics:
SpawnColor: 255,255,255 SpawnColor: 255,255,255
SpawnContrastColor: 0,0,0 SpawnContrastColor: 0,0,0
SpawnLabelOffset: 0,1 SpawnLabelOffset: 0,1
RaceSuffix-allies: allies FactionSuffix-allies: allies
RaceSuffix-england: allies FactionSuffix-england: allies
RaceSuffix-france: allies FactionSuffix-france: allies
RaceSuffix-germany: allies FactionSuffix-germany: allies
RaceSuffix-soviet: soviet FactionSuffix-soviet: soviet
RaceSuffix-russia: soviet FactionSuffix-russia: soviet
RaceSuffix-ukraine: soviet FactionSuffix-ukraine: soviet
IncompatibleGameColor: 169,169,169 IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211 CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0 ProtectedGameColor: 255,0,0

View File

@@ -108,7 +108,7 @@ order-icons-gdi: chrome.png
diplomacy-disabled: 327,481,30,31 diplomacy-disabled: 327,481,30,31
diplomacy-active: 296,481,30,31 diplomacy-active: 296,481,30,31
# make this paragraph AddRaceSuffixLogic compatible # make this paragraph AddFactionSuffixLogic compatible
sidebar-bits-gdi: chrome.png sidebar-bits-gdi: chrome.png
production-tooltip-time: 416,208,16,16 production-tooltip-time: 416,208,16,16
production-tooltip-power: 480,160,16,16 production-tooltip-power: 480,160,16,16
@@ -230,7 +230,7 @@ order-icons-nod: chrome.png
diplomacy-disabled: 839,481,30,31 diplomacy-disabled: 839,481,30,31
diplomacy-active: 808,481,30,31 diplomacy-active: 808,481,30,31
# make this paragraph AddRaceSuffixLogic compatible # make this paragraph AddFactionSuffixLogic compatible
sidebar-bits-nod: chrome.png sidebar-bits-nod: chrome.png
production-tooltip-time: 928,208,16,16 production-tooltip-time: 928,208,16,16
production-tooltip-power: 992,160,16,16 production-tooltip-power: 992,160,16,16
@@ -249,7 +249,7 @@ cash-icons-nod: chrome.png
# GENERIC # GENERIC
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# make this paragraph AddRaceSuffixLogic compatible # make this paragraph AddFactionSuffixLogic compatible
sidebar-bits: chrome.png sidebar-bits: chrome.png
production-tooltip-time: 416,208,16,16 production-tooltip-time: 416,208,16,16
production-tooltip-power: 480,160,16,16 production-tooltip-power: 480,160,16,16

View File

@@ -17,7 +17,7 @@ Container@PLAYER_WIDGETS:
Container@PALETTE_FOREGROUND: Container@PALETTE_FOREGROUND:
Children: Children:
Image@ICON_TEMPLATE: Image@ICON_TEMPLATE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X:0-2 X:0-2
Y:0-2 Y:0-2
Width: 64 Width: 64
@@ -26,7 +26,7 @@ Container@PLAYER_WIDGETS:
ImageCollection: sidebar ImageCollection: sidebar
ImageName: background-supportoverlay ImageName: background-supportoverlay
Image@SIDEBAR_BACKGROUND_TOP: Image@SIDEBAR_BACKGROUND_TOP:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: WINDOW_RIGHT - 235 X: WINDOW_RIGHT - 235
Y: 0 Y: 0
Width: 235 Width: 235
@@ -41,7 +41,7 @@ Container@PLAYER_WIDGETS:
Y: 21 Y: 21
Children: Children:
MenuButton@DEBUG_BUTTON: MenuButton@DEBUG_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Key: escape Shift Key: escape Shift
X: 13 X: 13
Width: 30 Width: 30
@@ -52,13 +52,13 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
ImageName: debug ImageName: debug
Button@REPAIR_BUTTON: Button@REPAIR_BUTTON:
Logic: RepairOrderButtonLogic, AddRaceSuffixLogic Logic: RepairOrderButtonLogic, AddFactionSuffixLogic
X: 43 X: 43
Width: 30 Width: 30
Height: 31 Height: 31
@@ -68,12 +68,12 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
Button@SELL_BUTTON: Button@SELL_BUTTON:
Logic: SellOrderButtonLogic, AddRaceSuffixLogic Logic: SellOrderButtonLogic, AddFactionSuffixLogic
X: 73 X: 73
Width: 30 Width: 30
Height: 31 Height: 31
@@ -83,12 +83,12 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
Button@BEACON_BUTTON: Button@BEACON_BUTTON:
Logic: BeaconOrderButtonLogic, AddRaceSuffixLogic Logic: BeaconOrderButtonLogic, AddFactionSuffixLogic
X: 103 X: 103
Width: 30 Width: 30
Height: 31 Height: 31
@@ -98,12 +98,12 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
Button@POWER_BUTTON: Button@POWER_BUTTON:
Logic: PowerdownOrderButtonLogic, AddRaceSuffixLogic Logic: PowerdownOrderButtonLogic, AddFactionSuffixLogic
X: 133 X: 133
Width: 30 Width: 30
Height: 31 Height: 31
@@ -113,12 +113,12 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
MenuButton@DIPLOMACY_BUTTON: MenuButton@DIPLOMACY_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
MenuContainer: INGAME_DIPLOMACY_BG MenuContainer: INGAME_DIPLOMACY_BG
HideIngameUI: false HideIngameUI: false
Pause: false Pause: false
@@ -132,13 +132,13 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
ImageName: diplomacy ImageName: diplomacy
MenuButton@OPTIONS_BUTTON: MenuButton@OPTIONS_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Key: escape Key: escape
X: 193 X: 193
Width: 30 Width: 30
@@ -149,7 +149,7 @@ Container@PLAYER_WIDGETS:
VisualHeight: 0 VisualHeight: 0
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0 X: 0
Y: 0 Y: 0
ImageCollection: order-icons ImageCollection: order-icons
@@ -159,7 +159,7 @@ Container@PLAYER_WIDGETS:
Children: Children:
LogicTicker@RADAR_TICKER: LogicTicker@RADAR_TICKER:
Image@INSIGNIA: Image@INSIGNIA:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 37 X: 37
Y: 85 Y: 85
ImageCollection: radar ImageCollection: radar
@@ -201,7 +201,7 @@ Container@PLAYER_WIDGETS:
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
Children: Children:
Image@CASH_ICON: Image@CASH_ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 0-17 X: 0-17
Y: 5 Y: 5
ImageCollection: cash-icons ImageCollection: cash-icons
@@ -219,7 +219,7 @@ Container@PLAYER_WIDGETS:
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
Children: Children:
Image@POWER_ICON: Image@POWER_ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: PARENT_RIGHT + 0 X: PARENT_RIGHT + 0
Y: 5 Y: 5
ImageCollection: power-icons ImageCollection: power-icons
@@ -234,14 +234,14 @@ Container@PLAYER_WIDGETS:
Container@PALETTE_BACKGROUND: Container@PALETTE_BACKGROUND:
Children: Children:
Image@ROW_TEMPLATE: Image@ROW_TEMPLATE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 235 Width: 235
Height: 52 Height: 52
ClickThrough: false ClickThrough: false
ImageCollection: sidebar ImageCollection: sidebar
ImageName: background-iconrow ImageName: background-iconrow
Image@BOTTOM_CAP: Image@BOTTOM_CAP:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 235 Width: 235
Height: 26 Height: 26
ClickThrough: false ClickThrough: false
@@ -264,7 +264,7 @@ Container@PLAYER_WIDGETS:
Y: 0 Y: 0
Children: Children:
Image@ROW_TEMPLATE: Image@ROW_TEMPLATE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
Width: 235 Width: 235
Height: 52 Height: 52
IgnoreMouseOver: true IgnoreMouseOver: true
@@ -277,7 +277,7 @@ Container@PLAYER_WIDGETS:
Height: 311 Height: 311
Children: Children:
ProductionTypeButton@BUILDING: ProductionTypeButton@BUILDING:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 41 X: 41
Y: 1 Y: 1
Width: 30 Width: 30
@@ -290,12 +290,12 @@ Container@PLAYER_WIDGETS:
HotkeyName: ProductionTypeBuildingKey HotkeyName: ProductionTypeBuildingKey
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 7 X: 7
Y: 7 Y: 7
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@DEFENSE: ProductionTypeButton@DEFENSE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 72 X: 72
Y: 1 Y: 1
Width: 30 Width: 30
@@ -308,12 +308,12 @@ Container@PLAYER_WIDGETS:
HotkeyName: ProductionTypeDefenseKey HotkeyName: ProductionTypeDefenseKey
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 7 X: 7
Y: 7 Y: 7
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@INFANTRY: ProductionTypeButton@INFANTRY:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 103 X: 103
Y: 1 Y: 1
Width: 30 Width: 30
@@ -326,12 +326,12 @@ Container@PLAYER_WIDGETS:
HotkeyName: ProductionTypeInfantryKey HotkeyName: ProductionTypeInfantryKey
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 6 X: 6
Y: 7 Y: 7
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@VEHICLE: ProductionTypeButton@VEHICLE:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 134 X: 134
Y: 1 Y: 1
Width: 30 Width: 30
@@ -344,12 +344,12 @@ Container@PLAYER_WIDGETS:
HotkeyName: ProductionTypeVehicleKey HotkeyName: ProductionTypeVehicleKey
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 7 X: 7
Y: 7 Y: 7
ImageCollection: production-icons ImageCollection: production-icons
ProductionTypeButton@AIRCRAFT: ProductionTypeButton@AIRCRAFT:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 165 X: 165
Y: 1 Y: 1
Width: 30 Width: 30
@@ -362,12 +362,12 @@ Container@PLAYER_WIDGETS:
HotkeyName: ProductionTypeAircraftKey HotkeyName: ProductionTypeAircraftKey
Children: Children:
Image@ICON: Image@ICON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 7 X: 7
Y: 7 Y: 7
ImageCollection: production-icons ImageCollection: production-icons
Button@SCROLL_UP_BUTTON: Button@SCROLL_UP_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 74 X: 74
Y: PARENT_BOTTOM + 36 Y: PARENT_BOTTOM + 36
Width: 34 Width: 34
@@ -377,7 +377,7 @@ Container@PLAYER_WIDGETS:
TooltipText: Scroll up TooltipText: Scroll up
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
Button@SCROLL_DOWN_BUTTON: Button@SCROLL_DOWN_BUTTON:
Logic: AddRaceSuffixLogic Logic: AddFactionSuffixLogic
X: 141 X: 141
Y: PARENT_BOTTOM + 36 Y: PARENT_BOTTOM + 36
Width: 34 Width: 34