Split out an ActivityUtils class.

This commit is contained in:
Paul Chote
2016-01-14 21:50:11 +00:00
parent e46fc644c1
commit 0039a2bdbf
32 changed files with 120 additions and 98 deletions

View File

@@ -53,8 +53,8 @@ namespace OpenRA.Mods.Common.Activities
case State.Turn:
dockingState = State.Dock;
if (IsDragRequired)
return Util.SequenceActivities(new Turn(self, DockAngle), new Drag(self, StartDrag, EndDrag, DragLength), this);
return Util.SequenceActivities(new Turn(self, DockAngle), this);
return ActivityUtils.SequenceActivities(new Turn(self, DockAngle), new Drag(self, StartDrag, EndDrag, DragLength), this);
return ActivityUtils.SequenceActivities(new Turn(self, DockAngle), this);
case State.Dock:
if (Refinery.IsInWorld && !Refinery.IsDead)
foreach (var nd in Refinery.TraitsImplementing<INotifyDocking>())
@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Activities
Harv.LastLinkedProc = Harv.LinkedProc;
Harv.LinkProc(self, null);
if (IsDragRequired)
return Util.SequenceActivities(new Drag(self, EndDrag, StartDrag, DragLength), NextActivity);
return ActivityUtils.SequenceActivities(new Drag(self, EndDrag, StartDrag, DragLength), NextActivity);
return NextActivity;
}