Add an EffectiveOwnerInit

This commit is contained in:
abcdefg30
2017-08-08 14:31:23 +02:00
committed by reaperrr
parent 503b91d391
commit eab93ccf97

View File

@@ -44,4 +44,13 @@ namespace OpenRA.Mods.Common
public FactionInit(string faction) { Faction = faction; } public FactionInit(string faction) { Faction = faction; }
public string Value(World world) { return Faction; } public string Value(World world) { return Faction; }
} }
public class EffectiveOwnerInit : IActorInit<Player>
{
[FieldFromYamlKey] readonly Player value = null;
public EffectiveOwnerInit() { }
public EffectiveOwnerInit(Player owner) { value = owner; }
Player IActorInit<Player>.Value(World world) { return value; }
}
} }