Chronosphere implementation plus supporting tweaks to Order
This commit is contained in:
@@ -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)
|
||||
@@ -31,7 +37,7 @@ namespace OpenRa.Game.Orders
|
||||
|
||||
if (unit != null)
|
||||
{
|
||||
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, null);
|
||||
yield return new Order("ChronosphereSelect", underCursor, null, int2.Zero, null, chronospherePower);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user