Airborne transports only land to (un)load.

This commit is contained in:
tovl
2019-06-30 13:41:01 +00:00
committed by reaperrr
parent 76422933f6
commit 5920de1384
15 changed files with 211 additions and 97 deletions

View File

@@ -42,9 +42,15 @@ namespace OpenRA.Mods.Common.Scripting
[ScriptActorPropertyActivity]
[Desc("Command transport to unload passengers.")]
public void UnloadPassengers()
public void UnloadPassengers(CPos? cell = null, int unloadRange = 5)
{
Self.QueueActivity(new UnloadCargo(Self, true));
if (cell.HasValue)
{
var destination = Target.FromCell(Self.World, cell.Value);
Self.QueueActivity(new UnloadCargo(Self, destination, WDist.FromCells(unloadRange)));
}
else
Self.QueueActivity(new UnloadCargo(Self, WDist.FromCells(unloadRange)));
}
}
}