diff --git a/OpenRA.Mods.Common/ActorInitializer.cs b/OpenRA.Mods.Common/ActorInitializer.cs index fc2eb8cf0f..6b696a3957 100644 --- a/OpenRA.Mods.Common/ActorInitializer.cs +++ b/OpenRA.Mods.Common/ActorInitializer.cs @@ -44,4 +44,13 @@ namespace OpenRA.Mods.Common public FactionInit(string faction) { Faction = faction; } public string Value(World world) { return Faction; } } + + public class EffectiveOwnerInit : IActorInit + { + [FieldFromYamlKey] readonly Player value = null; + + public EffectiveOwnerInit() { } + public EffectiveOwnerInit(Player owner) { value = owner; } + Player IActorInit.Value(World world) { return value; } + } }