Allow support powers to override the icon overlay/tooltip labels.

This commit is contained in:
Paul Chote
2018-10-09 19:28:02 +01:00
committed by reaperrr
parent 70b020205d
commit 1fa90c0474
3 changed files with 29 additions and 12 deletions

View File

@@ -105,13 +105,6 @@ namespace OpenRA.Mods.Common.Traits
Powers[order.OrderString].Activate(order);
}
// Deprecated. Remove after SupportPowerBinWidget is removed.
public void Target(string key)
{
if (Powers.ContainsKey(key))
Powers[key].Target();
}
static readonly SupportPowerInstance[] NoInstances = { };
public IEnumerable<SupportPowerInstance> GetPowersForActor(Actor a)
@@ -260,6 +253,16 @@ namespace OpenRA.Mods.Common.Traits
oneShotFired = true;
}
}
public virtual string IconOverlayTextOverride()
{
return null;
}
public virtual string TooltipTimeTextOverride()
{
return null;
}
}
public class SelectGenericPowerTarget : OrderGenerator