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>();
|
IEnumerable<CPos> landingCells = Enumerable.Empty<CPos>();
|
||||||
bool requireForceMove;
|
bool requireForceMove;
|
||||||
int creationActivityDelay;
|
|
||||||
|
readonly int creationActivityDelay;
|
||||||
|
|
||||||
bool notify = true;
|
bool notify = true;
|
||||||
|
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
int ticksSinceLastShot;
|
int ticksSinceLastShot;
|
||||||
int currentBarrel;
|
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 WDist Recoil;
|
||||||
public int FireDelay { get; protected set; }
|
public int FireDelay { get; protected set; }
|
||||||
|
|||||||
@@ -274,9 +274,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly BuildingInfluence influence;
|
readonly BuildingInfluence influence;
|
||||||
|
|
||||||
(CPos, SubCell)[] occupiedCells;
|
readonly (CPos, SubCell)[] occupiedCells;
|
||||||
(CPos, SubCell)[] targetableCells;
|
readonly (CPos, SubCell)[] targetableCells;
|
||||||
CPos[] transitOnlyCells;
|
readonly CPos[] transitOnlyCells;
|
||||||
|
|
||||||
public CPos TopLeft => topLeft;
|
public CPos TopLeft => topLeft;
|
||||||
public WPos CenterPosition { get; private set; }
|
public WPos CenterPosition { get; private set; }
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public class IndexedColorRemap : IPaletteRemap
|
public class IndexedColorRemap : IPaletteRemap
|
||||||
{
|
{
|
||||||
Dictionary<int, int> replacements = new Dictionary<int, int>();
|
readonly Dictionary<int, int> replacements = new Dictionary<int, int>();
|
||||||
IPalette basePalette;
|
readonly IPalette basePalette;
|
||||||
|
|
||||||
public IndexedColorRemap(IPalette basePalette, int[] ramp, int[] remap)
|
public IndexedColorRemap(IPalette basePalette, int[] ramp, int[] remap)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public class ProvidesTechPrerequisite : ITechTreePrerequisite
|
public class ProvidesTechPrerequisite : ITechTreePrerequisite
|
||||||
{
|
{
|
||||||
readonly ProvidesTechPrerequisiteInfo info;
|
readonly ProvidesTechPrerequisiteInfo info;
|
||||||
bool enabled;
|
readonly bool enabled;
|
||||||
|
|
||||||
static readonly string[] NoPrerequisites = Array.Empty<string>();
|
static readonly string[] NoPrerequisites = Array.Empty<string>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user