Upgrade mod rules.

This commit is contained in:
Paul Chote
2015-04-26 01:29:59 +12:00
parent 97b4509607
commit d255a3989e
7 changed files with 18 additions and 27 deletions

View File

@@ -872,10 +872,26 @@ namespace OpenRA.Mods.Common.UtilityCommands
} }
} }
if (engineVersion < 201504277) if (engineVersion < 20150427)
if (node.Key.StartsWith("WithRotor")) if (node.Key.StartsWith("WithRotor"))
node.Value.Nodes.RemoveAll(p => p.Key == "Id"); node.Value.Nodes.RemoveAll(p => p.Key == "Id");
if (engineVersion < 20150430)
{
if (node.Key.StartsWith("ProductionQueue@") || node.Key.StartsWith("ClassicProductionQueue@"))
node.Value.Nodes.RemoveAll(n => n.Key == "RequireOwner");
if (node.Key == "Buildable")
{
var removed = node.Value.Nodes.RemoveAll(n => n.Key == "Owner");
if (removed > 0)
{
Console.WriteLine("The 'Owner' field has been removed.");
Console.WriteLine("Please use prerequisites instead.");
}
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -24,7 +24,6 @@ FACT:
ProductionQueue@GDIBuilding: ProductionQueue@GDIBuilding:
Type: Building.GDI Type: Building.GDI
Race: gdi Race: gdi
RequireOwner: false
Group: Building Group: Building
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 2 LowPowerSlowdown: 2
@@ -33,7 +32,6 @@ FACT:
ProductionQueue@NodBuilding: ProductionQueue@NodBuilding:
Type: Building.Nod Type: Building.Nod
Race: nod Race: nod
RequireOwner: false
Group: Building Group: Building
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 2 LowPowerSlowdown: 2
@@ -42,7 +40,6 @@ FACT:
ProductionQueue@GDIDefense: ProductionQueue@GDIDefense:
Type: Defence.GDI Type: Defence.GDI
Race: gdi Race: gdi
RequireOwner: false
Group: Defence Group: Defence
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
@@ -51,7 +48,6 @@ FACT:
ProductionQueue@NodDefense: ProductionQueue@NodDefense:
Type: Defence.Nod Type: Defence.Nod
Race: nod Race: nod
RequireOwner: false
Group: Defence Group: Defence
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
@@ -413,14 +409,12 @@ HPAD:
Type: Aircraft.GDI Type: Aircraft.GDI
Race: gdi Race: gdi
Group: Aircraft Group: Aircraft
RequireOwner: false
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
ProductionQueue@Nod: ProductionQueue@Nod:
Type: Aircraft.Nod Type: Aircraft.Nod
Race: nod Race: nod
Group: Aircraft Group: Aircraft
RequireOwner: false
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
ProductionBar@GDI: ProductionBar@GDI:

View File

@@ -6,24 +6,20 @@ Player:
QueuedAudio: Building QueuedAudio: Building
ReadyAudio: BuildingReady ReadyAudio: BuildingReady
BlockedAudio: NoRoom BlockedAudio: NoRoom
RequireOwner: false
ClassicProductionQueue@Infantry: ClassicProductionQueue@Infantry:
Type: Infantry Type: Infantry
LowPowerSlowdown: 2 LowPowerSlowdown: 2
BlockedAudio: NoRoom BlockedAudio: NoRoom
RequireOwner: false
ClassicProductionQueue@Vehicle: ClassicProductionQueue@Vehicle:
Type: Vehicle Type: Vehicle
LowPowerSlowdown: 3 LowPowerSlowdown: 3
QueuedAudio: Building QueuedAudio: Building
BlockedAudio: NoRoom BlockedAudio: NoRoom
RequireOwner: false
ClassicProductionQueue@Armor: ClassicProductionQueue@Armor:
Type: Armor Type: Armor
LowPowerSlowdown: 3 LowPowerSlowdown: 3
QueuedAudio: Building QueuedAudio: Building
BlockedAudio: NoRoom BlockedAudio: NoRoom
RequireOwner: false
ClassicProductionQueue@Starport: ClassicProductionQueue@Starport:
Type: Starport Type: Starport
BuildSpeed: .2 BuildSpeed: .2
@@ -31,13 +27,11 @@ Player:
BlockedAudio: NoRoom BlockedAudio: NoRoom
QueuedAudio: OrderPlaced QueuedAudio: OrderPlaced
ReadyAudio: ReadyAudio:
RequireOwner: false
ClassicProductionQueue@Aircraft: ClassicProductionQueue@Aircraft:
Type: Aircraft Type: Aircraft
LowPowerSlowdown: 3 LowPowerSlowdown: 3
QueuedAudio: Building QueuedAudio: Building
BlockedAudio: NoRoom BlockedAudio: NoRoom
RequireOwner: false
PlaceBuilding: PlaceBuilding:
SupportPowerManager: SupportPowerManager:
ScriptTriggers: ScriptTriggers:
@@ -74,3 +68,4 @@ Player:
Prerequisites: techlevel.low, techlevel.medium, techlevel.high, techlevel.superweapons Prerequisites: techlevel.low, techlevel.medium, techlevel.high, techlevel.superweapons
EnemyWatcher: EnemyWatcher:
HarvesterInsurance: HarvesterInsurance:

View File

@@ -813,7 +813,6 @@ Rules:
Queue: Vehicle Queue: Vehicle
BuildPaletteOrder: 30 BuildPaletteOrder: 30
Prerequisites: fix Prerequisites: fix
Owner: allies
Valued: Valued:
Cost: 800 Cost: 800
Tooltip: Tooltip:
@@ -886,7 +885,6 @@ Rules:
Buildable: Buildable:
Queue: Building Queue: Building
BuildPaletteOrder: 30 BuildPaletteOrder: 30
Owner: allies, soviet
Valued: Valued:
Cost: 30 Cost: 30
Health: Health:

View File

@@ -1325,7 +1325,6 @@ Rules:
InitialUnits: e1, e1, e2, e3, e4 InitialUnits: e1, e1, e2, e3, e4
Ant: Ant:
Buildable: Buildable:
Owner: soviet
Prerequisites: barr Prerequisites: barr
Health: Health:
HP: 200 HP: 200

View File

@@ -7,7 +7,6 @@ Player:
QueuedAudio: Building QueuedAudio: Building
ReadyAudio: ConstructionComplete ReadyAudio: ConstructionComplete
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Defense: ClassicProductionQueue@Defense:
Type: Defense Type: Defense
BuildSpeed: .4 BuildSpeed: .4
@@ -15,31 +14,26 @@ Player:
QueuedAudio: Building QueuedAudio: Building
ReadyAudio: ConstructionComplete ReadyAudio: ConstructionComplete
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Vehicle: ClassicProductionQueue@Vehicle:
Type: Vehicle Type: Vehicle
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Infantry: ClassicProductionQueue@Infantry:
Type: Infantry Type: Infantry
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Ship: ClassicProductionQueue@Ship:
Type: Ship Type: Ship
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Aircraft: ClassicProductionQueue@Aircraft:
Type: Aircraft Type: Aircraft
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
PlaceBuilding: PlaceBuilding:
SupportPowerManager: SupportPowerManager:
ScriptTriggers: ScriptTriggers:

View File

@@ -7,7 +7,6 @@ Player:
QueuedAudio: Building QueuedAudio: Building
ReadyAudio: ConstructionComplete ReadyAudio: ConstructionComplete
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Defense: ClassicProductionQueue@Defense:
Type: Defense Type: Defense
BuildSpeed: .4 BuildSpeed: .4
@@ -15,25 +14,21 @@ Player:
QueuedAudio: Building QueuedAudio: Building
ReadyAudio: ConstructionComplete ReadyAudio: ConstructionComplete
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Vehicle: ClassicProductionQueue@Vehicle:
Type: Vehicle Type: Vehicle
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Infantry: ClassicProductionQueue@Infantry:
Type: Infantry Type: Infantry
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
ClassicProductionQueue@Air: ClassicProductionQueue@Air:
Type: Air Type: Air
BuildSpeed: .4 BuildSpeed: .4
LowPowerSlowdown: 3 LowPowerSlowdown: 3
SpeedUp: True SpeedUp: True
RequireOwner: false
PlaceBuilding: PlaceBuilding:
Palette: ra Palette: ra
SupportPowerManager: SupportPowerManager: