reinstate CrateAction.ExcludedActorTypes; custom maps use this.

This commit is contained in:
Chris Forbes
2011-07-16 19:09:15 +12:00
parent 21ab82f91d
commit 6a99ff7931
2 changed files with 10 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ namespace OpenRA.Mods.RA
public int SelectionShares = 10;
public string Effect = null;
public string Notification = null;
public string[] ExcludedActorTypes = { };
public virtual object Create(ActorInitializer init) { return new CrateAction(init.self, this); }
}
@@ -34,6 +35,14 @@ namespace OpenRA.Mods.RA
this.info = info;
}
public int GetSelectionSharesOuter(Actor collector)
{
if (info.ExcludedActorTypes.Contains(collector.Info.Name))
return 0;
return GetSelectionShares(collector);
}
public virtual int GetSelectionShares(Actor collector)
{
return info.SelectionShares;