Prepare condition attributes for new lint rule.
This commit is contained in:
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
"Externally granted conditions that aren't explicitly whitelisted will be silently ignored.")]
|
||||
public class ExternalConditionsInfo : TraitInfo<ExternalConditions>
|
||||
{
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
public readonly string[] Conditions = { };
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
class GrantConditionInfo : UpgradableTraitInfo
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("Condition to grant.")]
|
||||
public readonly string Condition = null;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class GrantConditionOnDamageStateInfo : ITraitInfo, Requires<HealthInfo>
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("Condition to grant.")]
|
||||
public readonly string Condition = null;
|
||||
|
||||
|
||||
@@ -21,11 +21,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class GrantConditionOnDeployInfo : ITraitInfo
|
||||
{
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("The condition to grant while the actor is undeployed.")]
|
||||
public readonly string UndeployedCondition = null;
|
||||
|
||||
[UpgradeGrantedReference, FieldLoader.Require]
|
||||
[FieldLoader.Require]
|
||||
[GrantedConditionReference]
|
||||
[Desc("The condition to grant after deploying and revoke before undeploying.")]
|
||||
public readonly string DeployedCondition = null;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class GrantConditionOnMovementInfo : UpgradableTraitInfo, Requires<IMoveInfo>
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("Condition to grant.")]
|
||||
public readonly string Condition = null;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class GrantConditionOnTerrainInfo : ITraitInfo
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("Condition to grant.")]
|
||||
public readonly string Condition = null;
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class StackedConditionInfo : TraitInfo<StackedCondition>
|
||||
{
|
||||
[FieldLoader.Require]
|
||||
[UpgradeUsedReference]
|
||||
[ConsumedConditionReference]
|
||||
[Desc("Condition to monitor.")]
|
||||
public readonly string Condition = null;
|
||||
|
||||
[FieldLoader.Require]
|
||||
[UpgradeGrantedReference]
|
||||
[GrantedConditionReference]
|
||||
[Desc("Conditions to grant when the monitored condition is granted multiple times.",
|
||||
"The first entry is activated at 2x grants, second entry at 3x grants, and so on.")]
|
||||
public readonly string[] StackedConditions = { };
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
static readonly IReadOnlyDictionary<string, bool> NoConditions = new ReadOnlyDictionary<string, bool>(new Dictionary<string, bool>());
|
||||
|
||||
[UpgradeUsedReference]
|
||||
[ConsumedConditionReference]
|
||||
[Desc("Boolean expression defining the condition to enable this trait.")]
|
||||
public readonly BooleanExpression RequiresCondition = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user