Add a PassengerCount property to the Lua API.

This commit is contained in:
Matthias Mailänder
2016-07-20 19:17:01 +02:00
parent f44623ce4d
commit 9775352856

View File

@@ -31,6 +31,9 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Specifies whether transport has any passengers.")] [Desc("Specifies whether transport has any passengers.")]
public bool HasPassengers { get { return cargo.Passengers.Any(); } } public bool HasPassengers { get { return cargo.Passengers.Any(); } }
[Desc("Specifies the amount of passengers.")]
public int PassengerCount { get { return cargo.Passengers.Count(); } }
[Desc("Teleport an existing actor inside this transport.")] [Desc("Teleport an existing actor inside this transport.")]
public void LoadPassenger(Actor a) { cargo.Load(Self, a); } public void LoadPassenger(Actor a) { cargo.Load(Self, a); }