set up some sensible build-palette order for RA

This commit is contained in:
Chris Forbes
2010-03-27 09:33:16 +13:00
parent 31a1ab7525
commit a00faf4b9f
3 changed files with 18 additions and 2 deletions

View File

@@ -877,7 +877,8 @@ namespace OpenRA
var allBuildables = Rules.TechTree.AllBuildables(queueName) var allBuildables = Rules.TechTree.AllBuildables(queueName)
.Where(a => a.Traits.Get<BuildableInfo>().Owner.Contains(world.LocalPlayer.Country.Race)) .Where(a => a.Traits.Get<BuildableInfo>().Owner.Contains(world.LocalPlayer.Country.Race))
.OrderBy(a => a.Traits.Get<BuildableInfo>().BuildPaletteOrder).ToArray(); .OrderBy(a => a.Traits.Get<BuildableInfo>().BuildPaletteOrder)
.ThenBy(a => a.Traits.Get<BuildableInfo>().TechLevel).ToArray();
var queue = world.LocalPlayer.PlayerActor.traits.Get<ProductionQueue>(); var queue = world.LocalPlayer.PlayerActor.traits.Get<ProductionQueue>();

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Traits
public readonly string LongDesc = ""; public readonly string LongDesc = "";
public readonly string Icon = null; public readonly string Icon = null;
public readonly string[] AlternateName = { }; public readonly string[] AlternateName = { };
public readonly int BuildPaletteOrder = 0; public readonly int BuildPaletteOrder = 50;
} }
class Buildable { } class Buildable { }

View File

@@ -480,6 +480,7 @@ SYRD:
Cost: 650 Cost: 650
Description: Shipyard Description: Shipyard
LongDesc: Produces and repairs ships LongDesc: Produces and repairs ships
BuildPaletteOrder: 4
Building: Building:
Power: -30 Power: -30
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -611,6 +612,7 @@ DOME:
Cost: 1000 Cost: 1000
Description: Radar Dome Description: Radar Dome
LongDesc: Provides an overview of the battlefield.\n Requires power to operate. LongDesc: Provides an overview of the battlefield.\n Requires power to operate.
BuildPaletteOrder: 6
Building: Building:
Power: -40 Power: -40
Footprint: xx xx Footprint: xx xx
@@ -1428,6 +1430,7 @@ WEAP:
Cost: 2000 Cost: 2000
Description: War Factory Description: War Factory
LongDesc: Produces tanks & light vehicles. LongDesc: Produces tanks & light vehicles.
BuildPaletteOrder: 5
Building: Building:
Power: -30 Power: -30
Footprint: xxx xxx Footprint: xxx xxx
@@ -1472,6 +1475,7 @@ PROC:
Cost: 2000 Cost: 2000
Description: Ore Refinery Description: Ore Refinery
LongDesc: Converts Ore and Gems into money LongDesc: Converts Ore and Gems into money
BuildPaletteOrder: 1
Building: Building:
Power: -30 Power: -30
Footprint: _x_ xxx x== Footprint: _x_ xxx x==
@@ -1575,6 +1579,7 @@ POWR:
Cost: 300 Cost: 300
Description: Power Plant Description: Power Plant
LongDesc: Provides power for other structures LongDesc: Provides power for other structures
BuildPaletteOrder: 0
Building: Building:
Power: 100 Power: 100
Footprint: xx xx Footprint: xx xx
@@ -1596,6 +1601,7 @@ APWR:
Cost: 500 Cost: 500
Description: Advanced Power Plant Description: Advanced Power Plant
LongDesc: Provides more power, cheaper than the \nstandard Power Plant LongDesc: Provides more power, cheaper than the \nstandard Power Plant
BuildPaletteOrder:2
Building: Building:
Power: 200 Power: 200
Footprint: ___ xxx xxx Footprint: ___ xxx xxx
@@ -1639,6 +1645,7 @@ BARR:
Cost: 300 Cost: 300
Description: Soviet Barracks Description: Soviet Barracks
LongDesc: Produces infantry LongDesc: Produces infantry
BuildPaletteOrder: 3
Building: Building:
Power: -20 Power: -20
Footprint: xx xx Footprint: xx xx
@@ -1663,6 +1670,7 @@ TENT:
Cost: 300 Cost: 300
Description: Allied Barracks Description: Allied Barracks
LongDesc: Produces infantry LongDesc: Produces infantry
BuildPaletteOrder: 3
Building: Building:
Power: -20 Power: -20
Footprint: xx xx Footprint: xx xx
@@ -1726,6 +1734,7 @@ FACF:
Cost: 50 Cost: 50
Description: Fake Construction Yard Description: Fake Construction Yard
LongDesc: Looks like a Construction Yard. LongDesc: Looks like a Construction Yard.
BuildPaletteOrder: 90
Building: Building:
Power: -2 Power: -2
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -1749,6 +1758,7 @@ WEAF:
Cost: 50 Cost: 50
Description: Fake War Factory Description: Fake War Factory
LongDesc: Looks like a War Factory. LongDesc: Looks like a War Factory.
BuildPaletteOrder: 90
Building: Building:
Power: -2 Power: -2
Footprint: xxx xxx Footprint: xxx xxx
@@ -1773,6 +1783,7 @@ SYRF:
Cost: 50 Cost: 50
Description: Fake Shipyard Description: Fake Shipyard
LongDesc: Looks like a Shipyard LongDesc: Looks like a Shipyard
BuildPaletteOrder: 90
Building: Building:
Power: -2 Power: -2
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -1812,6 +1823,7 @@ DOMF:
Cost: 50 Cost: 50
Description: Fake Radar Dome Description: Fake Radar Dome
LongDesc: Looks like a Radar Dome LongDesc: Looks like a Radar Dome
BuildPaletteOrder: 90
Building: Building:
Power: -2 Power: -2
Footprint: xx xx Footprint: xx xx
@@ -2586,6 +2598,7 @@ SBAG:
Cost: 25 Cost: 25
Description: Sandbag Wall Description: Sandbag Wall
LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
BuildPaletteOrder: 100
Building: Building:
HP: 100 HP: 100
Armor: none Armor: none
@@ -2599,6 +2612,7 @@ FENC:
Cost: 25 Cost: 25
Description: Wire Fence Description: Wire Fence
LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks. LongDesc: Stops infantry and blocks enemy fire.\nCan be crushed by tanks.
BuildPaletteOrder: 100
Building: Building:
HP: 100 HP: 100
Armor: none Armor: none
@@ -2612,6 +2626,7 @@ BRIK:
Cost: 100 Cost: 100
Description: Concrete Wall Description: Concrete Wall
LongDesc: Stop units and blocks enemy fire. LongDesc: Stop units and blocks enemy fire.
BuildPaletteOrder: 100
Building: Building:
HP: 100 HP: 100
Armor: none Armor: none