Iron curtain targetting polish
This commit is contained in:
@@ -317,7 +317,7 @@ namespace OpenRa.Game
|
||||
else
|
||||
{
|
||||
//repairButton.ReplaceAnim(Game.controller.orderGenerator is RepairOrderGenerator ? "pressed" : "normal");
|
||||
AddButton(curtainRect, isLmb => Game.controller.ToggleInputMode<IronCurtainOrderGenerator>());
|
||||
AddButton(curtainRect, isLmb => HandleIronCurtainButton());
|
||||
}
|
||||
buildPaletteRenderer.DrawSprite(repairButton.Image, curtainDrawPos, PaletteType.Chrome);
|
||||
|
||||
@@ -391,6 +391,12 @@ namespace OpenRa.Game
|
||||
Sound.Play("slcttgt1.aud");
|
||||
}
|
||||
|
||||
void HandleIronCurtainButton()
|
||||
{
|
||||
if (Game.controller.ToggleInputMode<IronCurtainOrderGenerator>())
|
||||
Sound.Play("slcttgt1.aud");
|
||||
}
|
||||
|
||||
void DrawChat()
|
||||
{
|
||||
var chatpos = new int2(400, Game.viewport.Height - 20);
|
||||
|
||||
@@ -32,10 +32,11 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
if (order.OrderString == "IronCurtain")
|
||||
{
|
||||
Game.controller.CancelInputMode();
|
||||
RemainingTicks = (int)(Rules.General.IronCurtain * 60 * 25);
|
||||
Sound.Play("ironcur9.aud");
|
||||
// Play active anim
|
||||
var ironCurtain = Game.world.Actors.Where(a => a.Owner == order.Subject.Owner && a.traits.Contains<IronCurtain>()).FirstOrDefault();
|
||||
Sound.Play("ironcur9.aud");
|
||||
if (ironCurtain != null)
|
||||
ironCurtain.traits.Get<RenderBuilding>().PlayCustomAnim(ironCurtain, "active");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user