Rename crates' ValidRaces

This commit is contained in:
Pavel Penev
2015-08-17 00:42:10 +03:00
parent b6b107de46
commit 1a95e7a9f1
2 changed files with 6 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("The list of unit target types we are allowed to duplicate.")] [Desc("The list of unit target types we are allowed to duplicate.")]
public readonly string[] ValidTargets = { "Ground", "Water" }; public readonly string[] ValidTargets = { "Ground", "Water" };
[Desc("Which races this crate action can occur for.")] [Desc("Which factions this crate action can occur for.")]
public readonly string[] ValidRaces = { }; public readonly string[] ValidFactions = { };
[Desc("Is the new duplicates given to a specific owner, regardless of whom collected it?")] [Desc("Is the new duplicates given to a specific owner, regardless of whom collected it?")]
public readonly string Owner = null; public readonly string Owner = null;
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits
public bool CanGiveTo(Actor collector) public bool CanGiveTo(Actor collector)
{ {
if (info.ValidRaces.Any() && !info.ValidRaces.Contains(collector.Owner.Faction.InternalName)) if (info.ValidFactions.Any() && !info.ValidFactions.Contains(collector.Owner.Faction.InternalName))
return false; return false;
var targetable = collector.Info.Traits.GetOrDefault<ITargetableInfo>(); var targetable = collector.Info.Traits.GetOrDefault<ITargetableInfo>();

View File

@@ -22,8 +22,8 @@ namespace OpenRA.Mods.Common.Traits
[ActorReference, FieldLoader.Require] [ActorReference, FieldLoader.Require]
public readonly string[] Units = { }; public readonly string[] Units = { };
[Desc("Races that are allowed to trigger this action")] [Desc("Factions that are allowed to trigger this action.")]
public readonly string[] ValidRaces = { }; public readonly string[] ValidFactions = { };
[Desc("Override the owner of the newly spawned unit: e.g. Creeps or Neutral")] [Desc("Override the owner of the newly spawned unit: e.g. Creeps or Neutral")]
public readonly string Owner = null; public readonly string Owner = null;
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
public bool CanGiveTo(Actor collector) public bool CanGiveTo(Actor collector)
{ {
if (info.ValidRaces.Any() && !info.ValidRaces.Contains(collector.Owner.Faction.InternalName)) if (info.ValidFactions.Any() && !info.ValidFactions.Contains(collector.Owner.Faction.InternalName))
return false; return false;
foreach (string unit in info.Units) foreach (string unit in info.Units)