Add readonly where it is missing and fix those field names according to their modifiers (#2589)
This commit is contained in:
@@ -607,7 +607,7 @@ namespace Content.Client.UserInterface.AdminMenu
|
||||
GetValueFromData = (obj) => ((GasPrototype) obj).ID.ToString(),
|
||||
};
|
||||
|
||||
private CommandUISpinBox _amount = new CommandUISpinBox
|
||||
private readonly CommandUISpinBox _amount = new CommandUISpinBox
|
||||
{
|
||||
Name = "Amount"
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Client.UserInterface.Cargo
|
||||
public event Action<BaseButton.ButtonEventArgs> OnOrderApproved;
|
||||
public event Action<BaseButton.ButtonEventArgs> OnOrderCanceled;
|
||||
|
||||
private List<string> _categoryStrings = new List<string>();
|
||||
private readonly List<string> _categoryStrings = new List<string>();
|
||||
|
||||
private Label _accountNameLabel { get; set; }
|
||||
private Label _pointsLabel { get; set; }
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Client.UserInterface.Cargo
|
||||
{
|
||||
public class GalacticBankSelectionMenu : SS14Window
|
||||
{
|
||||
private ItemList _accounts;
|
||||
private readonly ItemList _accounts;
|
||||
private int _accountCount = 0;
|
||||
private string[] _accountNames = new string[] { };
|
||||
private int[] _accountIds = new int[] { };
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Content.Client.UserInterface
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
|
||||
private ShaderInstance _shader;
|
||||
private readonly ShaderInstance _shader;
|
||||
|
||||
public CooldownGraphic()
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Content.Client.UserInterface
|
||||
|
||||
public event Action<string> SelectedId;
|
||||
|
||||
private Dictionary<string, JobButton> JobButtons = new Dictionary<string, JobButton>();
|
||||
private readonly Dictionary<string, JobButton> _jobButtons = new Dictionary<string, JobButton>();
|
||||
|
||||
public LateJoinGui()
|
||||
{
|
||||
@@ -95,7 +95,7 @@ namespace Content.Client.UserInterface
|
||||
jobButton.Disabled = true;
|
||||
}
|
||||
|
||||
JobButtons[job.ID] = jobButton;
|
||||
_jobButtons[job.ID] = jobButton;
|
||||
}
|
||||
|
||||
SelectedId += jobId =>
|
||||
@@ -115,7 +115,7 @@ namespace Content.Client.UserInterface
|
||||
|
||||
private void JobsAvailableUpdated(IReadOnlyList<string> jobs)
|
||||
{
|
||||
foreach (var (id, button) in JobButtons)
|
||||
foreach (var (id, button) in _jobButtons)
|
||||
{
|
||||
button.Disabled = !jobs.Contains(id);
|
||||
}
|
||||
@@ -128,7 +128,7 @@ namespace Content.Client.UserInterface
|
||||
if (disposing)
|
||||
{
|
||||
_gameTicker.LobbyJobsAvailableUpdated -= JobsAvailableUpdated;
|
||||
JobButtons.Clear();
|
||||
_jobButtons.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace Content.Client.UserInterface
|
||||
private readonly IClientPreferencesManager _preferencesManager;
|
||||
private IEntity _previewDummy;
|
||||
private readonly Label _summaryLabel;
|
||||
private VBoxContainer _loaded;
|
||||
private Label _unloaded;
|
||||
private readonly VBoxContainer _loaded;
|
||||
private readonly Label _unloaded;
|
||||
|
||||
public LobbyCharacterPreviewPanel(IEntityManager entityManager,
|
||||
IClientPreferencesManager preferencesManager)
|
||||
|
||||
@@ -258,8 +258,8 @@ namespace Content.Client.UserInterface
|
||||
|
||||
public class LobbyPlayerList : Control
|
||||
{
|
||||
private ScrollContainer _scroll;
|
||||
private VBoxContainer _vBox;
|
||||
private readonly ScrollContainer _scroll;
|
||||
private readonly VBoxContainer _vBox;
|
||||
|
||||
public LobbyPlayerList()
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Content.Client.ParticleAccelerator
|
||||
{
|
||||
public sealed class ParticleAcceleratorControlMenu : BaseWindow
|
||||
{
|
||||
private ShaderInstance _greyScaleShader;
|
||||
private readonly ShaderInstance _greyScaleShader;
|
||||
|
||||
private readonly ParticleAcceleratorBoundUserInterface Owner;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user