Veteran unit production & unlocking through spies.
This commit is contained in:
@@ -79,6 +79,11 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
var location = new float2(RenderBounds.Location) + new float2(queue.i * (IconWidth + IconSpacing), 0);
|
||||
WidgetUtils.DrawSHPCentered(icon.Image, location + 0.5f * iconSize, worldRenderer.Palette(bi.IconPalette), 0.5f);
|
||||
|
||||
var pio = queue.Trait.Actor.Owner.PlayerActor.TraitsImplementing<IProductionIconOverlay>().FirstOrDefault();
|
||||
if (pio != null && pio.IsOverlayActive(actor))
|
||||
WidgetUtils.DrawSHPCentered(pio.Sprite(), location + 0.5f * iconSize + pio.Offset(0.5f * iconSize),
|
||||
worldRenderer.Palette(pio.Palette()), 0.5f * pio.Scale());
|
||||
|
||||
var clock = clocks[queue.Trait];
|
||||
clock.PlayFetchIndex("idle",
|
||||
() => current.TotalTime == 0 ? 0 : ((current.TotalTime - current.RemainingTime)
|
||||
|
||||
@@ -351,11 +351,18 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var buildableItems = CurrentQueue.BuildableItems();
|
||||
|
||||
var pio = currentQueue.Actor.Owner.PlayerActor.TraitsImplementing<IProductionIconOverlay>().FirstOrDefault();
|
||||
var pioOffset = pio != null ? pio.Offset(IconSize) : new float2(0, 0);
|
||||
|
||||
// Icons
|
||||
foreach (var icon in icons.Values)
|
||||
{
|
||||
WidgetUtils.DrawSHPCentered(icon.Sprite, icon.Pos + iconOffset, icon.Palette);
|
||||
|
||||
// Draw the ProductionIconOverlay's sprite
|
||||
if (pio != null && pio.IsOverlayActive(icon.Actor))
|
||||
WidgetUtils.DrawSHPCentered(pio.Sprite(), icon.Pos + iconOffset + pioOffset, worldRenderer.Palette(pio.Palette()), pio.Scale());
|
||||
|
||||
// Build progress
|
||||
if (icon.Queued.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user