From 22dc63620fd61e5267ebd494cdc275a17337a214 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 26 Sep 2014 14:55:42 +0200 Subject: [PATCH] Unhardcoded productionbar colors --- OpenRA.Mods.RA/ProductionBar.cs | 4 +++- mods/ra/rules/structures.yaml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/ProductionBar.cs b/OpenRA.Mods.RA/ProductionBar.cs index 39dd26538a..a7a4dabe18 100644 --- a/OpenRA.Mods.RA/ProductionBar.cs +++ b/OpenRA.Mods.RA/ProductionBar.cs @@ -21,6 +21,8 @@ namespace OpenRA.Mods.RA [Desc("Production queue type, for actors with multiple queues.")] public readonly string ProductionType = null; + public readonly Color Color = Color.SkyBlue; + public object Create(ActorInitializer init) { return new ProductionBar(init.self, this); } } @@ -72,6 +74,6 @@ namespace OpenRA.Mods.RA return value; } - public Color GetColor() { return Color.SkyBlue; } + public Color GetColor() { return info.Color; } } } diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 978fac4089..de58836ac8 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -758,6 +758,7 @@ FACT: ProductionType: Building ProductionBar@Defense: ProductionType: Defense + Color: 138,138,138 DeadBuildingState: BaseProvider: Range: 16