Add EffectiveOwner to Lua Scripting API.

This commit is contained in:
Kevin Hinton
2017-12-13 05:53:02 +00:00
committed by Paul Chote
parent 72a11ec2a5
commit 86f9b8807e

View File

@@ -80,6 +80,18 @@ namespace OpenRA.Mods.Common.Scripting
{
Self.World.Add(new FlashTarget(Self, asPlayer, duration));
}
[Desc("The effective owner of the actor.")]
public Player EffectiveOwner
{
get
{
if (Self.EffectiveOwner == null || Self.EffectiveOwner.Owner == null)
return Self.Owner;
return Self.EffectiveOwner.Owner;
}
}
}
[ScriptPropertyGroup("General")]