Iron curtain power implementation; Remove AutoActivate attribute to be part of the GPS implementation
This commit is contained in:
@@ -4,11 +4,17 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRa.Game.GameRules;
|
||||
using OpenRa.Game.Traits;
|
||||
|
||||
using OpenRa.Game.SupportPowers;
|
||||
namespace OpenRa.Game.Orders
|
||||
{
|
||||
class IronCurtainOrderGenerator : IOrderGenerator
|
||||
{
|
||||
ISupportPowerImpl power;
|
||||
public IronCurtainOrderGenerator(ISupportPowerImpl power)
|
||||
{
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public IEnumerable<Order> Order(int2 xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button == MouseButton.Right)
|
||||
@@ -31,7 +37,8 @@ namespace OpenRa.Game.Orders
|
||||
|
||||
if (unit != null)
|
||||
{
|
||||
yield return new Order("IronCurtain", underCursor, null, int2.Zero, null);
|
||||
yield return new Order("IronCurtain", underCursor, this.power);
|
||||
//yield return new Order("IronCurtain", underCursor, null, int2.Zero, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using OpenRa.Game.SupportPowers;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
@@ -31,6 +32,19 @@ namespace OpenRa.Game
|
||||
this.TargetLocation = targetLocation;
|
||||
this.TargetString = targetString;
|
||||
}
|
||||
// This is a hack - fix me
|
||||
public readonly ISupportPowerImpl Power;
|
||||
public Order(string orderString, Actor subject, ISupportPowerImpl power)
|
||||
{
|
||||
this.OrderString = orderString;
|
||||
this.SubjectId = UIntFromActor( subject );
|
||||
|
||||
this.Power = power;
|
||||
|
||||
this.TargetActorId = UIntFromActor(null);
|
||||
this.TargetLocation = int2.Zero;
|
||||
this.TargetString = null;
|
||||
}
|
||||
|
||||
public bool Validate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user