Replace MoveIntoWorld with ReturnToCell/AssociateWithAirfield.
This commit is contained in:
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
var pos = Self.CenterPosition;
|
||||
mobile.SetPosition(Self, cell);
|
||||
mobile.SetVisualPosition(Self, pos);
|
||||
Self.QueueActivity(mobile.MoveIntoWorld(Self));
|
||||
Self.QueueActivity(mobile.ReturnToCell(Self));
|
||||
}
|
||||
|
||||
[ScriptActorPropertyActivity]
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user