rename some of Mobile's Activity-builders
This commit is contained in:
@@ -166,8 +166,8 @@ namespace OpenRA.Mods.Cnc
|
|||||||
{
|
{
|
||||||
var self = Actors[ "Gunboat" ];
|
var self = Actors[ "Gunboat" ];
|
||||||
var mobile = self.Trait<Mobile>();
|
var mobile = self.Trait<Mobile>();
|
||||||
self.QueueActivity(mobile.MoveTo( Map.Waypoints["gunboatLeft"] ));
|
self.QueueActivity(mobile.ScriptedMove( Map.Waypoints["gunboatLeft"] ));
|
||||||
self.QueueActivity(mobile.MoveTo( Map.Waypoints["gunboatRight"] ));
|
self.QueueActivity(mobile.ScriptedMove( Map.Waypoints["gunboatRight"] ));
|
||||||
self.QueueActivity(new CallFunc(() => SetGunboatPath()));
|
self.QueueActivity(new CallFunc(() => SetGunboatPath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ namespace OpenRA.Mods.Cnc
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
a.CancelActivity();
|
a.CancelActivity();
|
||||||
a.QueueActivity(mobile.MoveTo(endPos));
|
a.QueueActivity(mobile.ScriptedMove(endPos));
|
||||||
a.QueueActivity(new CallFunc(() =>
|
a.QueueActivity(new CallFunc(() =>
|
||||||
{
|
{
|
||||||
while (!cargo.IsEmpty(a))
|
while (!cargo.IsEmpty(a))
|
||||||
@@ -210,7 +210,7 @@ namespace OpenRA.Mods.Cnc
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
a.QueueActivity(new Wait(25));
|
a.QueueActivity(new Wait(25));
|
||||||
a.QueueActivity(mobile.MoveTo(startPos));
|
a.QueueActivity(mobile.ScriptedMove(startPos));
|
||||||
a.QueueActivity(new RemoveSelf());
|
a.QueueActivity(new RemoveSelf());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
return NextActivity;
|
return NextActivity;
|
||||||
|
|
||||||
if (!Combat.IsInRange( self.CenterLocation, Range, Target))
|
if (!Combat.IsInRange( self.CenterLocation, Range, Target))
|
||||||
return Util.SequenceActivities( self.Trait<Mobile>().MoveTo( Target, Range ), this );
|
return Util.SequenceActivities( self.Trait<Mobile>().MoveWithinRange( Target, Range ), this );
|
||||||
|
|
||||||
var desiredFacing = Util.GetFacing(Target.CenterLocation - self.CenterLocation, 0);
|
var desiredFacing = Util.GetFacing(Target.CenterLocation - self.CenterLocation, 0);
|
||||||
var renderUnit = self.TraitOrDefault<RenderUnit>();
|
var renderUnit = self.TraitOrDefault<RenderUnit>();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
if( inRange ) return this;
|
if( inRange ) return this;
|
||||||
|
|
||||||
var mobile = self.Trait<Mobile>();
|
var mobile = self.Trait<Mobile>();
|
||||||
return Util.SequenceActivities( mobile.MoveTo( Target, Range ), this );
|
return Util.SequenceActivities( mobile.MoveWithinRange( Target, Range ), this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,11 +373,11 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActivity MoveTo( int2 cell ) { return new Move( cell ); }
|
public IActivity ScriptedMove( int2 cell ) { return new Move( cell ); }
|
||||||
public IActivity MoveTo( int2 cell, int range ) { return new Move( cell, range ); }
|
public IActivity MoveTo( int2 cell, int nearEnough ) { return new Move( cell, nearEnough ); }
|
||||||
public IActivity MoveTo( int2 cell, Actor ignoredActor ) { return new Move( cell, ignoredActor ); }
|
public IActivity MoveTo( int2 cell, Actor ignoredActor ) { return new Move( cell, ignoredActor ); }
|
||||||
public IActivity MoveTo( Actor target, int range ) { return new Move( target, range ); }
|
public IActivity MoveWithinRange( Actor target, int range ) { return new Move( target, range ); }
|
||||||
public IActivity MoveTo( Target target, int range ) { return new Move( target, range ); }
|
public IActivity MoveWithinRange( Target target, int range ) { return new Move( target, range ); }
|
||||||
public IActivity MoveTo( Func<List<int2>> pathFunc ) { return new Move( pathFunc ); }
|
public IActivity MoveTo( Func<List<int2>> pathFunc ) { return new Move( pathFunc ); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
var mobile = self.Trait<Mobile>();
|
var mobile = self.Trait<Mobile>();
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
self.QueueActivity(mobile.MoveTo(order.TargetActor, 1));
|
self.QueueActivity(mobile.MoveWithinRange(order.TargetActor, 1));
|
||||||
if (self.Owner == self.World.LocalPlayer)
|
if (self.Owner == self.World.LocalPlayer)
|
||||||
self.World.AddFrameEndTask( w =>
|
self.World.AddFrameEndTask( w =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user