#44 fixed
This commit is contained in:
@@ -932,10 +932,10 @@ namespace OpenRa
|
||||
shpRenderer.DrawSprite(ready.Image,
|
||||
drawPos + new float2((64 - ready.Image.size.X) / 2, 2),
|
||||
PaletteType.Chrome);
|
||||
|
||||
AddButton(rect, HandleSupportPower( sp ));
|
||||
}
|
||||
|
||||
AddButton(rect, HandleSupportPower(sp));
|
||||
|
||||
if (rect.Contains(lastMousePos.ToPoint()))
|
||||
{
|
||||
tooltipItem = sp;
|
||||
|
||||
@@ -102,6 +102,21 @@ namespace OpenRa.Traits
|
||||
protected virtual void OnFinishCharging() { }
|
||||
protected virtual void OnActivate() { }
|
||||
|
||||
public void Activate() { OnActivate(); } // todo: some more hax
|
||||
public void Activate()
|
||||
{
|
||||
if (!IsAvailable || !IsReady)
|
||||
{
|
||||
Sound.Play("briefing.aud");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Info.RequiresPower && Owner.GetPowerState() != PowerState.Normal)
|
||||
{
|
||||
Sound.Play("nopowr1.aud");
|
||||
return;
|
||||
}
|
||||
|
||||
OnActivate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user