fix some support powers
This commit is contained in:
@@ -35,8 +35,11 @@ namespace OpenRA.Orders
|
|||||||
|
|
||||||
IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi)
|
IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi)
|
||||||
{
|
{
|
||||||
if (mi.Button == MouseButton.Left && world.Map.IsInMap(xy))
|
if( mi.Button == MouseButton.Left && world.Map.IsInMap( xy ) )
|
||||||
yield return new Order(order, subject, xy);
|
{
|
||||||
|
world.CancelInputMode();
|
||||||
|
yield return new Order( order, subject, xy );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Tick(World world) { }
|
public virtual void Tick(World world) { }
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ namespace OpenRA.Mods.Cnc
|
|||||||
w.Add(new IonCannon(self, w, order.TargetLocation));
|
w.Add(new IonCannon(self, w, order.TargetLocation));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Owner == Owner.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
FinishActivate();
|
FinishActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,9 +54,9 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
if (order.OrderString == "BeginMinefield")
|
if (order.OrderString == "BeginMinefield")
|
||||||
{
|
{
|
||||||
minefieldStart = order.TargetLocation;
|
//minefieldStart = order.TargetLocation;
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
//if (self.Owner == self.World.LocalPlayer)
|
||||||
self.World.OrderGenerator = new MinefieldOrderGenerator(self);
|
// self.World.OrderGenerator = new MinefieldOrderGenerator(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (order.OrderString == "PlaceMinefield")
|
if (order.OrderString == "PlaceMinefield")
|
||||||
|
|||||||
@@ -63,9 +63,6 @@ namespace OpenRA.Mods.RA.Orders
|
|||||||
p.CurrentItem().Item == Building &&
|
p.CurrentItem().Item == Building &&
|
||||||
p.CurrentItem().RemainingTime == 0)
|
p.CurrentItem().RemainingTime == 0)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (queue == null)
|
|
||||||
world.CancelInputMode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenderAfterWorld( World world ) {}
|
public void RenderAfterWorld( World world ) {}
|
||||||
|
|||||||
@@ -71,9 +71,6 @@ namespace OpenRA.Mods.RA
|
|||||||
a.QueueActivity(new RemoveSelf());
|
a.QueueActivity(new RemoveSelf());
|
||||||
});
|
});
|
||||||
|
|
||||||
if (Owner == Owner.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
FinishActivate();
|
FinishActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
if (order.OrderString == "ChronosphereActivate")
|
if (order.OrderString == "ChronosphereActivate")
|
||||||
{
|
{
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
// Ensure the target cell is valid for the unit
|
// Ensure the target cell is valid for the unit
|
||||||
var movement = order.TargetActor.TraitOrDefault<IMove>();
|
var movement = order.TargetActor.TraitOrDefault<IMove>();
|
||||||
if (!movement.CanEnterCell(order.TargetLocation))
|
if (!movement.CanEnterCell(order.TargetLocation))
|
||||||
|
|||||||
@@ -39,9 +39,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
if (order.OrderString == "IronCurtain")
|
if (order.OrderString == "IronCurtain")
|
||||||
{
|
{
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
var curtain = self.World.Queries.WithTrait<IronCurtain>()
|
var curtain = self.World.Queries.WithTrait<IronCurtain>()
|
||||||
.Where(a => a.Actor.Owner != null)
|
.Where(a => a.Actor.Owner != null)
|
||||||
.FirstOrDefault().Actor;
|
.FirstOrDefault().Actor;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
silo.Trait<NukeSilo>().Attack(order.TargetLocation);
|
silo.Trait<NukeSilo>().Attack(order.TargetLocation);
|
||||||
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
FinishActivate();
|
FinishActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
if (order.OrderString == "ParatroopersActivate")
|
if (order.OrderString == "ParatroopersActivate")
|
||||||
{
|
{
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
DoParadrop(Owner, order.TargetLocation,
|
DoParadrop(Owner, order.TargetLocation,
|
||||||
self.Info.Traits.Get<ParatroopersPowerInfo>().DropItems);
|
self.Info.Traits.Get<ParatroopersPowerInfo>().DropItems);
|
||||||
|
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
FinishActivate();
|
FinishActivate();
|
||||||
|
|
||||||
if (order.Player == Owner.World.LocalPlayer)
|
|
||||||
self.World.CancelInputMode();
|
|
||||||
|
|
||||||
var enterCell = self.World.ChooseRandomEdgeCell();
|
var enterCell = self.World.ChooseRandomEdgeCell();
|
||||||
|
|
||||||
var plane = self.World.CreateActor("u2", new TypeDictionary
|
var plane = self.World.CreateActor("u2", new TypeDictionary
|
||||||
|
|||||||
Reference in New Issue
Block a user