Added field to ProductionQueue to customize ordering in ObserverProductionIconsWidget

This commit is contained in:
teinarss
2019-05-24 18:29:56 +02:00
committed by Paul Chote
parent 71995dbcbe
commit 12484caf04
6 changed files with 34 additions and 2 deletions

View File

@@ -26,6 +26,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("What kind of production will be added (e.g. Building, Infantry, Vehicle, ...)")]
public readonly string Type = null;
[Desc("The value used when ordering this for display (e.g. in the Spectator UI).")]
public readonly int DisplayOrder = 0;
[Desc("Group queues from separate buildings together into the same tab.")]
public readonly string Group = null;
@@ -617,6 +620,7 @@ namespace OpenRA.Mods.Common.Traits
public bool Started { get; private set; }
public int Slowdown { get; private set; }
public bool Infinite { get; set; }
public int BuildPaletteOrder { get; private set; }
readonly ActorInfo ai;
readonly BuildableInfo bi;
@@ -632,6 +636,7 @@ namespace OpenRA.Mods.Common.Traits
this.pm = pm;
ai = Queue.Actor.World.Map.Rules.Actors[Item];
bi = ai.TraitInfo<BuildableInfo>();
BuildPaletteOrder = bi.BuildPaletteOrder;
Infinite = false;
}