Add country definitions
This commit is contained in:
@@ -33,5 +33,17 @@ namespace OpenRA.Widgets
|
|||||||
{
|
{
|
||||||
return FieldLoader.GetValue<T>(key, data[key]);
|
return FieldLoader.GetValue<T>(key, data[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool TryGet<T>(string key, out T result)
|
||||||
|
{
|
||||||
|
string s;
|
||||||
|
if (!data.TryGetValue(key, out s))
|
||||||
|
{
|
||||||
|
result = default(T);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
result = FieldLoader.GetValue<T>(key, s);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public AddRaceSuffixLogic(Widget widget, World world)
|
public AddRaceSuffixLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
var suffix = "-" + world.LocalPlayer.Country.Race;
|
string race;
|
||||||
|
if (!ChromeMetrics.TryGet("RaceSuffix-" + world.LocalPlayer.Country.Race, out race))
|
||||||
|
race = world.LocalPlayer.Country.Race;
|
||||||
|
var suffix = "-" + race;
|
||||||
|
|
||||||
if (widget is ButtonWidget)
|
if (widget is ButtonWidget)
|
||||||
((ButtonWidget)widget).Background += suffix;
|
((ButtonWidget)widget).Background += suffix;
|
||||||
else if (widget is ImageWidget)
|
else if (widget is ImageWidget)
|
||||||
|
|||||||
@@ -337,7 +337,12 @@ strategic: strategic.png
|
|||||||
|
|
||||||
flags: buttons.png
|
flags: buttons.png
|
||||||
allies: 30,112,30,15
|
allies: 30,112,30,15
|
||||||
|
england: 30,112,30,15
|
||||||
|
france: 30,112,30,15
|
||||||
|
germany: 30,112,30,15
|
||||||
soviet: 0,112,30,15
|
soviet: 0,112,30,15
|
||||||
|
russia: 0,112,30,15
|
||||||
|
ukraine: 0,112,30,15
|
||||||
random: 60,112,30,15
|
random: 60,112,30,15
|
||||||
spectator: 60,112,30,15
|
spectator: 60,112,30,15
|
||||||
|
|
||||||
|
|||||||
@@ -24,3 +24,10 @@ 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
|
||||||
|
RaceSuffix-england: allies
|
||||||
|
RaceSuffix-france: allies
|
||||||
|
RaceSuffix-germany: allies
|
||||||
|
RaceSuffix-soviet: soviet
|
||||||
|
RaceSuffix-russia: soviet
|
||||||
|
RaceSuffix-ukraine: soviet
|
||||||
|
|||||||
@@ -96,8 +96,23 @@ World:
|
|||||||
Name: Allies
|
Name: Allies
|
||||||
Race: allies
|
Race: allies
|
||||||
Country@1:
|
Country@1:
|
||||||
|
Name: England
|
||||||
|
Race: england
|
||||||
|
Country@2:
|
||||||
|
Name: France
|
||||||
|
Race: france
|
||||||
|
Country@3:
|
||||||
|
Name: Germany
|
||||||
|
Race: germany
|
||||||
|
Country@4:
|
||||||
Name: Soviet
|
Name: Soviet
|
||||||
Race: soviet
|
Race: soviet
|
||||||
|
Country@5:
|
||||||
|
Name: Russia
|
||||||
|
Race: russia
|
||||||
|
Country@6:
|
||||||
|
Name: Ukraine
|
||||||
|
Race: ukraine
|
||||||
DomainIndex:
|
DomainIndex:
|
||||||
SmudgeLayer@SCORCH:
|
SmudgeLayer@SCORCH:
|
||||||
Type: Scorch
|
Type: Scorch
|
||||||
@@ -139,12 +154,12 @@ World:
|
|||||||
MPStartUnits@mcvonly:
|
MPStartUnits@mcvonly:
|
||||||
Class: none
|
Class: none
|
||||||
ClassName: MCV Only
|
ClassName: MCV Only
|
||||||
Races: soviet, allies
|
Races: allies, england, france, germany, soviet, russia, ukraine
|
||||||
BaseActor: mcv
|
BaseActor: mcv
|
||||||
MPStartUnits@lightallies:
|
MPStartUnits@lightallies:
|
||||||
Class: light
|
Class: light
|
||||||
ClassName: Light Support
|
ClassName: Light Support
|
||||||
Races: allies
|
Races: allies, england, france, germany
|
||||||
BaseActor: mcv
|
BaseActor: mcv
|
||||||
SupportActors: e1,e1,e1,e3,e3,jeep,1tnk
|
SupportActors: e1,e1,e1,e3,e3,jeep,1tnk
|
||||||
InnerSupportRadius: 3
|
InnerSupportRadius: 3
|
||||||
@@ -152,7 +167,7 @@ World:
|
|||||||
MPStartUnits@lightsoviet:
|
MPStartUnits@lightsoviet:
|
||||||
Class: light
|
Class: light
|
||||||
ClassName: Light Support
|
ClassName: Light Support
|
||||||
Races: soviet
|
Races: soviet, russia, ukraine
|
||||||
BaseActor: mcv
|
BaseActor: mcv
|
||||||
SupportActors: e1,e1,e1,e3,e3,apc,ftrk
|
SupportActors: e1,e1,e1,e3,e3,apc,ftrk
|
||||||
InnerSupportRadius: 3
|
InnerSupportRadius: 3
|
||||||
@@ -160,7 +175,7 @@ World:
|
|||||||
MPStartUnits@heavyallies:
|
MPStartUnits@heavyallies:
|
||||||
Class: heavy
|
Class: heavy
|
||||||
ClassName: Heavy Support
|
ClassName: Heavy Support
|
||||||
Races: allies
|
Races: allies, england, france, germany
|
||||||
BaseActor: mcv
|
BaseActor: mcv
|
||||||
SupportActors: e1,e1,e1,e3,e3,jeep,1tnk,2tnk,2tnk,2tnk
|
SupportActors: e1,e1,e1,e3,e3,jeep,1tnk,2tnk,2tnk,2tnk
|
||||||
InnerSupportRadius: 3
|
InnerSupportRadius: 3
|
||||||
@@ -168,7 +183,7 @@ World:
|
|||||||
MPStartUnits@heavysoviet:
|
MPStartUnits@heavysoviet:
|
||||||
Class: heavy
|
Class: heavy
|
||||||
ClassName: Heavy Support
|
ClassName: Heavy Support
|
||||||
Races: soviet
|
Races: soviet, russia, ukraine
|
||||||
BaseActor: mcv
|
BaseActor: mcv
|
||||||
SupportActors: e1,e1,e1,e3,e3,apc,ftrk,3tnk,3tnk
|
SupportActors: e1,e1,e1,e3,e3,apc,ftrk,3tnk,3tnk
|
||||||
InnerSupportRadius: 3
|
InnerSupportRadius: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user