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.
public class RaceInit : IActorInit<string>
// Allows maps / transformations to specify the faction variant of an actor.
public class FactionInit : IActorInit<string>
{
[FieldFromYamlKey] public readonly string Race;
[FieldFromYamlKey] public readonly string Faction;
public RaceInit() { }
public RaceInit(string race) { Race = race; }
public string Value(World world) { return Race; }
public FactionInit() { }
public FactionInit(string faction) { Faction = faction; }
public string Value(World world) { return Faction; }
}
}

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Traits
{
this.info = info;
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(() =>
{

View File

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

View File

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

View File

@@ -565,11 +565,11 @@
<Compile Include="Widgets\Logic\ButtonTooltipLogic.cs" />
<Compile Include="Widgets\Logic\ColorPickerLogic.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\DirectConnectLogic.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\ControlGroupLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\DebugMenuLogic.cs" />

View File

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

View File

@@ -30,8 +30,18 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("The player's color.")]
public HSLColor Color { get { return Player.Color; } }
[Desc("The player's race.")]
public string Race { get { return Player.PlayerReference.Faction; } }
[Desc("The player's race. (DEPRECATED! Use the `Faction` property.)")]
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.")]
public int Spawn { get { return Player.SpawnPoint; } }

View File

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

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common.Traits
playerPower = playerActor.Trait<PowerManager>();
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);
CacheProduceables(playerActor);

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
if (string.IsNullOrEmpty(prerequisite))
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);
}

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
{
Info = info;
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)
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Traits
};
if (raceVariant != null)
td.Add(new RaceInit(raceVariant));
td.Add(new FactionInit(raceVariant));
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)
{
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 image = GetImage(init.Actor, sequenceProvider, race);
var palette = init.WorldRenderer.Palette(Palette ?? PlayerPalette + ownerName);
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Traits
public RenderSprites(ActorInitializer init, RenderSpritesInfo 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)

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
public virtual IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init)
{
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 sequenceProvider = init.World.Map.SequenceProvider;
var image = Image ?? init.Actor.Name;

View File

@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits
self = init.Self;
this.info = info;
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)

View File

@@ -43,8 +43,8 @@ namespace OpenRA.Mods.Common.Traits
this.Owner = owner;
this.worldRenderer = worldRenderer;
if (!actor.InitDict.Contains<RaceInit>())
actor.InitDict.Add(new RaceInit(owner.Faction));
if (!actor.InitDict.Contains<FactionInit>())
actor.InitDict.Add(new FactionInit(owner.Faction));
if (!actor.InitDict.Contains<OwnerInit>())
actor.InitDict.Add(new OwnerInit(owner.Name));
@@ -118,8 +118,8 @@ namespace OpenRA.Mods.Common.Traits
{
Func<object, bool> saveInit = init =>
{
var race = init as RaceInit;
if (race != null && race.Race == Owner.Faction)
var factionInit = init as FactionInit;
if (factionInit != null && factionInit.Faction == Owner.Faction)
return false;
// 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);
}
if (engineVersion < 20150715)
{
if (node.Key == "Race")
node.Key = "Faction";
}
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();
td.Add(new HideBibPreviewInit());
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)
preview.SetPreview(actor, td);

View File

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

View File

@@ -14,10 +14,10 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class CountryTooltipLogic
public class FactionTooltipLogic
{
[ObjectCreator.UseCtor]
public CountryTooltipLogic(Widget widget, ButtonWidget button)
public FactionTooltipLogic(Widget widget, ButtonWidget button)
{
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 Dictionary<string, LobbyCountry> countries = new Dictionary<string, LobbyCountry>();
readonly Dictionary<string, LobbyFaction> factions = new Dictionary<string, LobbyFaction>();
readonly ColorPreviewManagerWidget colorPreview;
@@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
colorPreview.Color = Game.Settings.Player.Color;
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;
Func<bool> configurationDisabled = () => !Game.IsHost || gameStarting ||
@@ -714,7 +714,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupEditableNameWidget(template, slot, client, orderManager);
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.SetupEditableSpawnWidget(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,
() => panel = PanelType.Kick, () => panel = PanelType.Players);
LobbyUtils.SetupColorWidget(template, slot, client);
LobbyUtils.SetupFactionWidget(template, slot, client, countries);
LobbyUtils.SetupFactionWidget(template, slot, client, factions);
LobbyUtils.SetupTeamWidget(template, slot, client);
LobbyUtils.SetupSpawnWidget(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 string Name;

View File

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

View File

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

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.RA.Traits
{
this.info = info;
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)

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Traits
{
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)
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.RA.Traits
new LocationInit(self.Location),
new CenterPositionInit(self.CenterPosition),
new OwnerInit(self.Owner),
new RaceInit(race),
new FactionInit(race),
new SkipMakeAnimsInit()
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -25,13 +25,13 @@ Metrics:
SpawnColor: 255,255,255
SpawnContrastColor: 0,0,0
SpawnLabelOffset: 0,1
RaceSuffix-allies: allies
RaceSuffix-england: allies
RaceSuffix-france: allies
RaceSuffix-germany: allies
RaceSuffix-soviet: soviet
RaceSuffix-russia: soviet
RaceSuffix-ukraine: soviet
FactionSuffix-allies: allies
FactionSuffix-england: allies
FactionSuffix-france: allies
FactionSuffix-germany: allies
FactionSuffix-soviet: soviet
FactionSuffix-russia: soviet
FactionSuffix-ukraine: soviet
IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0
@@ -39,4 +39,4 @@ Metrics:
WaitingGameColor: 0,255,0
IncompatibleWaitingGameColor: 50,205,50
GameStartedColor: 255,165,0
IncompatibleGameStartedColor: 210,105,30
IncompatibleGameStartedColor: 210,105,30

View File

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

View File

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