Mark fields readonly.
This commit is contained in:
committed by
abcdefg30
parent
4a60d56753
commit
b147da388a
@@ -283,7 +283,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
IEnumerable<CPos> landingCells = Enumerable.Empty<CPos>();
|
||||
bool requireForceMove;
|
||||
int creationActivityDelay;
|
||||
|
||||
readonly int creationActivityDelay;
|
||||
|
||||
bool notify = true;
|
||||
|
||||
|
||||
@@ -125,9 +125,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
int ticksSinceLastShot;
|
||||
int currentBarrel;
|
||||
int barrelCount;
|
||||
readonly int barrelCount;
|
||||
|
||||
List<(int Ticks, Action Func)> delayedActions = new List<(int, Action)>();
|
||||
readonly List<(int Ticks, Action Func)> delayedActions = new List<(int, Action)>();
|
||||
|
||||
public WDist Recoil;
|
||||
public int FireDelay { get; protected set; }
|
||||
|
||||
@@ -274,9 +274,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
readonly Actor self;
|
||||
readonly BuildingInfluence influence;
|
||||
|
||||
(CPos, SubCell)[] occupiedCells;
|
||||
(CPos, SubCell)[] targetableCells;
|
||||
CPos[] transitOnlyCells;
|
||||
readonly (CPos, SubCell)[] occupiedCells;
|
||||
readonly (CPos, SubCell)[] targetableCells;
|
||||
readonly CPos[] transitOnlyCells;
|
||||
|
||||
public CPos TopLeft => topLeft;
|
||||
public WPos CenterPosition { get; private set; }
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class IndexedColorRemap : IPaletteRemap
|
||||
{
|
||||
Dictionary<int, int> replacements = new Dictionary<int, int>();
|
||||
IPalette basePalette;
|
||||
readonly Dictionary<int, int> replacements = new Dictionary<int, int>();
|
||||
readonly IPalette basePalette;
|
||||
|
||||
public IndexedColorRemap(IPalette basePalette, int[] ramp, int[] remap)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class ProvidesTechPrerequisite : ITechTreePrerequisite
|
||||
{
|
||||
readonly ProvidesTechPrerequisiteInfo info;
|
||||
bool enabled;
|
||||
readonly bool enabled;
|
||||
|
||||
static readonly string[] NoPrerequisites = Array.Empty<string>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user