Rename ConditionExpression => VariableExpression
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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; } }
|
||||
|
||||
Reference in New Issue
Block a user