#44 fixed
This commit is contained in:
@@ -932,9 +932,9 @@ namespace OpenRa
|
|||||||
shpRenderer.DrawSprite(ready.Image,
|
shpRenderer.DrawSprite(ready.Image,
|
||||||
drawPos + new float2((64 - ready.Image.size.X) / 2, 2),
|
drawPos + new float2((64 - ready.Image.size.X) / 2, 2),
|
||||||
PaletteType.Chrome);
|
PaletteType.Chrome);
|
||||||
|
}
|
||||||
|
|
||||||
AddButton(rect, HandleSupportPower(sp));
|
AddButton(rect, HandleSupportPower(sp));
|
||||||
}
|
|
||||||
|
|
||||||
if (rect.Contains(lastMousePos.ToPoint()))
|
if (rect.Contains(lastMousePos.ToPoint()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -102,6 +102,21 @@ namespace OpenRa.Traits
|
|||||||
protected virtual void OnFinishCharging() { }
|
protected virtual void OnFinishCharging() { }
|
||||||
protected virtual void OnActivate() { }
|
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