Replace MoveIntoWorld with ReturnToCell/AssociateWithAirfield.

This commit is contained in:
Paul Chote
2019-10-15 21:36:56 +01:00
committed by abcdefg30
parent 9b4d149a06
commit ae34410c80
12 changed files with 63 additions and 37 deletions

View File

@@ -10,6 +10,7 @@
#endregion
using System.Linq;
using Eluant;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Scripting;
@@ -35,7 +36,13 @@ namespace OpenRA.Mods.Common.Scripting
public int PassengerCount { get { return cargo.Passengers.Count(); } }
[Desc("Teleport an existing actor inside this transport.")]
public void LoadPassenger(Actor a) { cargo.Load(Self, a); }
public void LoadPassenger(Actor a)
{
if (!a.IsIdle)
throw new LuaException("LoadPassenger requires the passenger to be idle.");
cargo.Load(Self, a);
}
[Desc("Remove the first actor from the transport. This actor is not added to the world.")]
public Actor UnloadPassenger() { return cargo.Unload(Self); }