Rename ConditionExpression => VariableExpression

This commit is contained in:
atlimit8
2017-04-11 01:26:38 -05:00
parent 1fa8286f1e
commit e73d3922dd
8 changed files with 18 additions and 18 deletions

View File

@@ -29,9 +29,9 @@ namespace OpenRA.Mods.Common.Lint
if (typeof(IEnumerable<string>).IsAssignableFrom(type))
return fieldInfo.GetValue(ruleInfo) as IEnumerable<string>;
if (type == typeof(ConditionExpression))
if (type == typeof(VariableExpression))
{
var expr = (ConditionExpression)fieldInfo.GetValue(ruleInfo);
var expr = (VariableExpression)fieldInfo.GetValue(ruleInfo);
return expr != null ? expr.Variables : Enumerable.Empty<string>();
}
@@ -48,9 +48,9 @@ namespace OpenRA.Mods.Common.Lint
if (typeof(IEnumerable).IsAssignableFrom(type))
return (IEnumerable<string>)propertyInfo.GetValue(ruleInfo);
if (type == typeof(ConditionExpression))
if (type == typeof(VariableExpression))
{
var expr = (ConditionExpression)propertyInfo.GetValue(ruleInfo);
var expr = (VariableExpression)propertyInfo.GetValue(ruleInfo);
return expr != null ? expr.Variables : Enumerable.Empty<string>();
}

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
[ConsumedConditionReference]
[Desc("Boolean expression defining the condition to enable this trait.")]
public readonly ConditionExpression RequiresCondition = null;
public readonly VariableExpression RequiresCondition = null;
public abstract object Create(ActorInitializer init);

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Requirements for accepting a plug type.",
"Key is the plug type that the requirements applies to.",
"Value is the condition expression defining the requirements to place the plug.")]
public readonly Dictionary<string, ConditionExpression> Requirements = new Dictionary<string, ConditionExpression>();
public readonly Dictionary<string, VariableExpression> Requirements = new Dictionary<string, VariableExpression>();
[GrantedConditionReference]
public IEnumerable<string> LinterConditions { get { return Conditions.Values; } }