make UnloadCargo.unloadAll configurable; go back to all by default
This commit is contained in:
@@ -18,6 +18,10 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
{
|
{
|
||||||
public class UnloadCargo : Activity
|
public class UnloadCargo : Activity
|
||||||
{
|
{
|
||||||
|
bool unloadAll;
|
||||||
|
|
||||||
|
public UnloadCargo(bool unloadAll) { this.unloadAll = unloadAll; }
|
||||||
|
|
||||||
CPos? ChooseExitTile(Actor self, Actor cargo)
|
CPos? ChooseExitTile(Actor self, Actor cargo)
|
||||||
{
|
{
|
||||||
// is anyone still hogging this tile?
|
// is anyone still hogging this tile?
|
||||||
@@ -99,7 +103,7 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
actor.SetTargetLine(Target.FromCell(rallyPoint), Color.Green, false);
|
actor.SetTargetLine(Target.FromCell(rallyPoint), Color.Green, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
return NextActivity;
|
return unloadAll ? this : NextActivity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.RA
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
self.QueueActivity(new UnloadCargo());
|
self.QueueActivity(new UnloadCargo(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
chinook.QueueActivity(new HeliFly(insertionLZ.CenterLocation));
|
chinook.QueueActivity(new HeliFly(insertionLZ.CenterLocation));
|
||||||
chinook.QueueActivity(new Turn(0));
|
chinook.QueueActivity(new Turn(0));
|
||||||
chinook.QueueActivity(new HeliLand(true));
|
chinook.QueueActivity(new HeliLand(true));
|
||||||
chinook.QueueActivity(new UnloadCargo());
|
chinook.QueueActivity(new UnloadCargo(true));
|
||||||
chinook.QueueActivity(new CallFunc(() => Sound.Play("laugh1.aud")));
|
chinook.QueueActivity(new CallFunc(() => Sound.Play("laugh1.aud")));
|
||||||
chinook.QueueActivity(new Wait(150));
|
chinook.QueueActivity(new Wait(150));
|
||||||
chinook.QueueActivity(new HeliFly(chinookExitPoint.CenterLocation));
|
chinook.QueueActivity(new HeliFly(chinookExitPoint.CenterLocation));
|
||||||
|
|||||||
Reference in New Issue
Block a user