Added field to ProductionQueue to customize ordering in ObserverProductionIconsWidget
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user