Support changing owner from within scripted maps.

This commit is contained in:
Paul Chote
2014-10-13 19:22:22 +13:00
parent 8fdc631502
commit 8508fc5155

View File

@@ -48,7 +48,19 @@ namespace OpenRA.Mods.RA.Scripting
public bool IsIdle { get { return self.IsIdle; } }
[Desc("The player that owns the actor.")]
public Player Owner { get { return self.Owner; } }
public Player Owner
{
get
{
return self.Owner;
}
set
{
if (self.Owner != value)
self.ChangeOwner(value);
}
}
[Desc("The type of the actor (e.g. \"e1\").")]
public string Type { get { return self.Info.Name; } }