Add an upgrade rule for Country -> Faction
This commit is contained in:
@@ -1408,7 +1408,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
var upgradeTypes = trait.Value.Nodes.FirstOrDefault(n => n.Key == type + "Upgrade");
|
||||
var modifier = trait.Value.Nodes.FirstOrDefault(n => n.Key == type + "Modifier");
|
||||
|
||||
if (upgradeTypes == null || !string.IsNullOrEmpty(upgradeTypes.Value.Value) || modifier == null || !string.IsNullOrEmpty(modifier.Value.Value))
|
||||
if (upgradeTypes == null || !string.IsNullOrEmpty(upgradeTypes.Value.Value) || modifier == null ||
|
||||
!string.IsNullOrEmpty(modifier.Value.Value))
|
||||
{
|
||||
var yaml = new MiniYaml(null);
|
||||
if (modifier == null)
|
||||
@@ -1505,6 +1506,24 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
// Rename the `Country` trait to `Faction`
|
||||
if (engineVersion < 20150714)
|
||||
{
|
||||
var split = node.Key.Split('@');
|
||||
if (split.Any() && split[0] == "Country")
|
||||
{
|
||||
node.Key = node.Key.Replace("Country", "Faction");
|
||||
|
||||
var race = node.Value.Nodes.FirstOrDefault(x => x.Key == "Race");
|
||||
if (race != null)
|
||||
race.Key = "InternalName";
|
||||
|
||||
var randomRace = node.Value.Nodes.FirstOrDefault(x => x.Key == "RandomRaceMembers");
|
||||
if (randomRace != null)
|
||||
randomRace.Key = "RandomFactionMembers";
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
FogVariants: typea, typeb, typec, typed
|
||||
OverrideFullShroud: full
|
||||
OverrideFullFog: full
|
||||
Country@Random:
|
||||
Faction@Random:
|
||||
Name: Any
|
||||
Race: Random
|
||||
RandomRaceMembers: gdi, nod
|
||||
InternalName: Random
|
||||
RandomFactionMembers: gdi, nod
|
||||
Description: Select a random faction.
|
||||
Country@gdi:
|
||||
Faction@gdi:
|
||||
Name: GDI
|
||||
Race: gdi
|
||||
InternalName: gdi
|
||||
Description: Global Defense Initiative\nThe GDI is an international military branch of the United Nations tasked\nwith keeping world peace. Commanding the combined forces of the world's\nmost powerful nations, they possess an unmatched arsenal of high-tech weaponry.
|
||||
Country@nod:
|
||||
Faction@nod:
|
||||
Name: Nod
|
||||
Race: nod
|
||||
InternalName: nod
|
||||
Description: Brotherhood of Nod\nThe Brotherhood is a religious cult centered around their leader Kane\nand the alien substance Tiberium. They utilize stealth technology\nand guerilla tactics to defeat those who oppose them.
|
||||
ResourceType@green-tib:
|
||||
ResourceType: 1
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
OverrideFullShroud: full
|
||||
OverrideFullFog: full
|
||||
ShroudBlend: Multiply
|
||||
Country@Random:
|
||||
Faction@Random:
|
||||
Name: Any
|
||||
Race: Random
|
||||
RandomRaceMembers: atreides, harkonnen, ordos
|
||||
InternalName: Random
|
||||
RandomFactionMembers: atreides, harkonnen, ordos
|
||||
Description: Select a random House.
|
||||
Country@Atreides:
|
||||
Faction@Atreides:
|
||||
Name: Atreides
|
||||
Race: atreides
|
||||
InternalName: atreides
|
||||
Description: House Atreides\nThe noble Atreides, from the water world of Caladan,\nrely on their ornithopters to ensure air superiority.\nThey have allied themselves with the Fremen, the fearsome\nnative warriors of Dune that can move undetected in battle.
|
||||
Country@Harkonnen:
|
||||
Faction@Harkonnen:
|
||||
Name: Harkonnen
|
||||
Race: harkonnen
|
||||
InternalName: harkonnen
|
||||
Description: House Harkonnen\nThe evil Harkonnen will stop at nothing to gain control of the spice.\nThey rely on brute force and atomic weapons to achieve their goals:\nwealth, and the destruction of House Atreides.
|
||||
Country@Ordos:
|
||||
Faction@Ordos:
|
||||
Name: Ordos
|
||||
Race: ordos
|
||||
InternalName: ordos
|
||||
Description: House Ordos\nThe insidious Ordos of the icy planet Sigma Draconis IV\nare known for their wealth, greed and treachery.\nRelying heavily on mercenaries they often resort\nto sabotage and forbidden Ixian technologies.
|
||||
Country@Corrino:
|
||||
Faction@Corrino:
|
||||
Name: Corrino
|
||||
Race: corrino
|
||||
InternalName: corrino
|
||||
Selectable: false
|
||||
ResourceType@Spice:
|
||||
ResourceType: 1
|
||||
|
||||
@@ -12,57 +12,57 @@
|
||||
FogVariants: shroud
|
||||
Index: 255, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 20, 40, 56, 65, 97, 130, 148, 194, 24, 33, 66, 132, 28, 41, 67, 134, 1, 2, 4, 8, 3, 6, 12, 9, 7, 14, 13, 11, 5, 10, 15, 255
|
||||
UseExtendedIndex: true
|
||||
Country@0:
|
||||
Faction@0:
|
||||
Name: Allies
|
||||
Race: allies
|
||||
InternalName: allies
|
||||
Side: Allies
|
||||
Selectable: False
|
||||
Country@1:
|
||||
Faction@1:
|
||||
Name: England
|
||||
Race: england
|
||||
InternalName: england
|
||||
Side: Allies
|
||||
Description: England: Espionage\nSpecial Unit: British Spy\nSpecial Unit: Phase Transport
|
||||
Country@2:
|
||||
Faction@2:
|
||||
Name: France
|
||||
Race: france
|
||||
InternalName: france
|
||||
Side: Allies
|
||||
Description: France: Deception\nSpecial Ability: Can build fake structures\nSpecial Unit: Mobile Gap Generator
|
||||
Country@3:
|
||||
Faction@3:
|
||||
Name: Germany
|
||||
Race: germany
|
||||
InternalName: germany
|
||||
Side: Allies
|
||||
Description: Germany: Technology\nSpecial Ability: Advanced Chronoshift\nSpecial Unit: Chrono Tank
|
||||
Country@4:
|
||||
Faction@4:
|
||||
Name: Soviet
|
||||
Race: soviet
|
||||
InternalName: soviet
|
||||
Side: Soviet
|
||||
Selectable: False
|
||||
Country@5:
|
||||
Faction@5:
|
||||
Name: Russia
|
||||
Race: russia
|
||||
InternalName: russia
|
||||
Side: Soviet
|
||||
Description: Russia: Tesla Weapons\nSpecial Unit: Tesla Tank\nSpecial Unit: Shock Trooper
|
||||
Country@6:
|
||||
Faction@6:
|
||||
Name: Ukraine
|
||||
Race: ukraine
|
||||
InternalName: ukraine
|
||||
Side: Soviet
|
||||
Description: Ukraine: Demolitions\nSpecial Ability: Parabombs\nSpecial Unit: Demolition Truck
|
||||
Country@random:
|
||||
Faction@random:
|
||||
Name: Any
|
||||
Race: Random
|
||||
RandomRaceMembers: RandomAllies, RandomSoviet
|
||||
InternalName: Random
|
||||
RandomFactionMembers: RandomAllies, RandomSoviet
|
||||
Side: Random
|
||||
Description: A random country.
|
||||
Country@randomallies:
|
||||
Faction@randomallies:
|
||||
Name: Allies
|
||||
Race: RandomAllies
|
||||
RandomRaceMembers: england, france, germany
|
||||
InternalName: RandomAllies
|
||||
RandomFactionMembers: england, france, germany
|
||||
Side: Random
|
||||
Description: A random Allied country.
|
||||
Country@randomsoviet:
|
||||
Faction@randomsoviet:
|
||||
Name: Soviet
|
||||
Race: RandomSoviet
|
||||
RandomRaceMembers: russia, ukraine
|
||||
InternalName: RandomSoviet
|
||||
RandomFactionMembers: russia, ukraine
|
||||
Side: Random
|
||||
Description: A random Soviet country.
|
||||
ResourceType@ore:
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
UseExtendedIndex: true
|
||||
ShroudPalette: shroud
|
||||
FogPalette: shroud
|
||||
Country@Random:
|
||||
Faction@Random:
|
||||
Name: Any
|
||||
Race: Random
|
||||
RandomRaceMembers: gdi, nod
|
||||
Country@0:
|
||||
InternalName: Random
|
||||
RandomFactionMembers: gdi, nod
|
||||
Faction@0:
|
||||
Name: GDI
|
||||
Race: gdi
|
||||
Country@1:
|
||||
InternalName: gdi
|
||||
Faction@1:
|
||||
Name: Nod
|
||||
Race: nod
|
||||
InternalName: nod
|
||||
ResourceType@Tiberium:
|
||||
ResourceType: 1
|
||||
Palette: greentiberium
|
||||
|
||||
Reference in New Issue
Block a user