merged. may not actually work yet.
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using OpenRa.Game.Traits;
|
||||
using OpenRa.Game.SupportPowers;
|
||||
|
||||
namespace OpenRa.Game.Orders
|
||||
{
|
||||
class ChronoshiftDestinationOrderGenerator : IOrderGenerator
|
||||
{
|
||||
public readonly Actor self;
|
||||
SupportPower power;
|
||||
|
||||
public ChronoshiftDestinationOrderGenerator(Actor self)
|
||||
public ChronoshiftDestinationOrderGenerator(Actor self, SupportPower power)
|
||||
{
|
||||
this.self = self;
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public IEnumerable<Order> Order(int2 xy, MouseInput mi)
|
||||
@@ -23,8 +25,8 @@ namespace OpenRa.Game.Orders
|
||||
Game.controller.CancelInputMode();
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return new Order("Chronoshift", self, null, xy, null);
|
||||
yield return new Order("Chronoshift", self, null, xy,
|
||||
power != null ? power.Name : null);
|
||||
}
|
||||
|
||||
public void Tick() {}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRa.Game.GameRules;
|
||||
using OpenRa.Game.Traits;
|
||||
using OpenRa.Game.SupportPowers;
|
||||
|
||||
namespace OpenRa.Game.Orders
|
||||
{
|
||||
class ChronosphereSelectOrderGenerator : IOrderGenerator
|
||||
{
|
||||
ISupportPowerImpl chronospherePower;
|
||||
public ChronosphereSelectOrderGenerator(ISupportPowerImpl chronospherePower)
|
||||
{
|
||||
this.chronospherePower = chronospherePower;
|
||||
}
|
||||
|
||||
public IEnumerable<Order> Order(int2 xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button == MouseButton.Right)
|
||||
@@ -30,9 +36,7 @@ namespace OpenRa.Game.Orders
|
||||
var unit = underCursor != null ? underCursor.Info as UnitInfo : null;
|
||||
|
||||
if (unit != null)
|
||||
{
|
||||
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, null);
|
||||
}
|
||||
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, "ChronoshiftPower");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace OpenRa.Game
|
||||
public readonly int2 TargetLocation;
|
||||
public readonly string TargetString;
|
||||
public bool IsImmediate;
|
||||
|
||||
|
||||
public Actor Subject { get { return ActorFromUInt(SubjectId); } }
|
||||
public Actor TargetActor { get { return ActorFromUInt(TargetActorId); } }
|
||||
public Player Player { get { return Subject.Owner; } }
|
||||
@@ -21,8 +21,8 @@ namespace OpenRa.Game
|
||||
public Order(string orderString, Actor subject,
|
||||
Actor targetActor, int2 targetLocation, string targetString)
|
||||
: this( orderString, UIntFromActor( subject ),
|
||||
UIntFromActor( targetActor ), targetLocation, targetString ) {}
|
||||
|
||||
UIntFromActor( targetActor ), targetLocation, targetString) {}
|
||||
|
||||
Order(string orderString, uint subjectId,
|
||||
uint targetActorId, int2 targetLocation, string targetString)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ namespace OpenRa.Game
|
||||
this.SubjectId = subjectId;
|
||||
this.TargetActorId = targetActorId;
|
||||
this.TargetLocation = targetLocation;
|
||||
this.TargetString = targetString;
|
||||
this.TargetString = targetString;
|
||||
}
|
||||
|
||||
public bool Validate()
|
||||
|
||||
Reference in New Issue
Block a user