StyleCop cleanup
This commit is contained in:
@@ -41,16 +41,15 @@ namespace OpenRA.Orders
|
|||||||
.Where(o => o != null)
|
.Where(o => o != null)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
var actorsInvolved = orders.Select(o => o.self).Distinct();
|
var actorsInvolved = orders.Select(o => o.Self).Distinct();
|
||||||
if (actorsInvolved.Any())
|
if (actorsInvolved.Any())
|
||||||
yield return new Order("CreateGroup", actorsInvolved.First().Owner.PlayerActor, false)
|
yield return new Order("CreateGroup", actorsInvolved.First().Owner.PlayerActor, false)
|
||||||
{
|
{
|
||||||
TargetString = actorsInvolved.Select(a => a.ActorID).JoinWith(",")
|
TargetString = actorsInvolved.Select(a => a.ActorID).JoinWith(",")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
foreach (var o in orders)
|
foreach (var o in orders)
|
||||||
yield return CheckSameOrder(o.iot, o.trait.IssueOrder(o.self, o.iot, o.target, mi.Modifiers.HasModifier(Modifiers.Shift)));
|
yield return CheckSameOrder(o.Order, o.Trait.IssueOrder(o.Self, o.Order, o.Target, mi.Modifiers.HasModifier(Modifiers.Shift)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(World world) { }
|
public void Tick(World world) { }
|
||||||
@@ -89,7 +88,7 @@ namespace OpenRA.Orders
|
|||||||
.Where(o => o != null)
|
.Where(o => o != null)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
var cursorName = orders.Select(o => o.cursor).FirstOrDefault();
|
var cursorName = orders.Select(o => o.Cursor).FirstOrDefault();
|
||||||
return cursorName ?? (useSelect ? "select" : "default");
|
return cursorName ?? (useSelect ? "select" : "default");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,9 +102,9 @@ namespace OpenRA.Orders
|
|||||||
|
|
||||||
if (mi.Button == Game.mouseButtonPreference.Action)
|
if (mi.Button == Game.mouseButtonPreference.Action)
|
||||||
{
|
{
|
||||||
foreach( var o in self.TraitsImplementing<IIssueOrder>()
|
foreach (var o in self.TraitsImplementing<IIssueOrder>()
|
||||||
.SelectMany(trait => trait.Orders
|
.SelectMany(trait => trait.Orders
|
||||||
.Select(x => new { Trait = trait, Order = x } ))
|
.Select(x => new { Trait = trait, Order = x }))
|
||||||
.OrderByDescending(x => x.Order.OrderPriority))
|
.OrderByDescending(x => x.Order.OrderPriority))
|
||||||
{
|
{
|
||||||
var actorsAt = self.World.ActorMap.GetUnitsAt(target.CenterPosition.ToCPos()).ToList();
|
var actorsAt = self.World.ActorMap.GetUnitsAt(target.CenterPosition.ToCPos()).ToList();
|
||||||
@@ -138,19 +137,19 @@ namespace OpenRA.Orders
|
|||||||
|
|
||||||
class UnitOrderResult
|
class UnitOrderResult
|
||||||
{
|
{
|
||||||
public readonly Actor self;
|
public readonly Actor Self;
|
||||||
public readonly IOrderTargeter iot;
|
public readonly IOrderTargeter Order;
|
||||||
public readonly IIssueOrder trait;
|
public readonly IIssueOrder Trait;
|
||||||
public readonly string cursor;
|
public readonly string Cursor;
|
||||||
public readonly Target target;
|
public readonly Target Target;
|
||||||
|
|
||||||
public UnitOrderResult(Actor self, IOrderTargeter iot, IIssueOrder trait, string cursor, Target target)
|
public UnitOrderResult(Actor self, IOrderTargeter order, IIssueOrder trait, string cursor, Target target)
|
||||||
{
|
{
|
||||||
this.self = self;
|
this.Self = self;
|
||||||
this.iot = iot;
|
this.Order = order;
|
||||||
this.trait = trait;
|
this.Trait = trait;
|
||||||
this.cursor = cursor;
|
this.Cursor = cursor;
|
||||||
this.target = target;
|
this.Target = target;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,9 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
{
|
{
|
||||||
if (order is MoveOrderTargeter)
|
if (order is MoveOrderTargeter)
|
||||||
{
|
{
|
||||||
if (Info.OnRails) return null;
|
if (Info.OnRails)
|
||||||
|
return null;
|
||||||
|
|
||||||
return new Order("Move", self, queued) { TargetLocation = target.CenterPosition.ToCPos() };
|
return new Order("Move", self, queued) { TargetLocation = target.CenterPosition.ToCPos() };
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user