Fix and enable SA1133, SA1134 style rules.

This commit is contained in:
Paul Chote
2019-05-23 18:43:21 +00:00
committed by abcdefg30
parent fbf9461890
commit 78a70be0d4
214 changed files with 1012 additions and 432 deletions

View File

@@ -32,11 +32,13 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Image for the level up sprite.")]
public readonly string LevelUpImage = null;
[SequenceReference("Image")]
[Desc("Sequence for the level up sprite. Needs to be present on Image.")]
[SequenceReference("Image")] public readonly string LevelUpSequence = "levelup";
public readonly string LevelUpSequence = "levelup";
[PaletteReference]
[Desc("Palette for the level up sprite.")]
[PaletteReference] public readonly string LevelUpPalette = "effect";
public readonly string LevelUpPalette = "effect";
[Desc("Multiplier to apply to the Conditions keys. Defaults to the actor's value.")]
public readonly int ExperienceModifier = -1;
@@ -60,9 +62,11 @@ namespace OpenRA.Mods.Common.Traits
ConditionManager conditionManager;
// Stored as a percentage of our value
[Sync] int experience = 0;
[Sync]
int experience = 0;
[Sync] public int Level { get; private set; }
[Sync]
public int Level { get; private set; }
public readonly int MaxLevel;
public GainsExperience(ActorInitializer init, GainsExperienceInfo info)
@@ -137,7 +141,9 @@ namespace OpenRA.Mods.Common.Traits
class ExperienceInit : IActorInit<int>
{
[FieldFromYamlKey] readonly int value;
[FieldFromYamlKey]
readonly int value;
public ExperienceInit() { }
public ExperienceInit(int init) { value = init; }
public int Value(World world) { return value; }