Add readonly where it is missing and fix those field names according to their modifiers (#2589)

This commit is contained in:
DrSmugleaf
2020-11-21 14:02:00 +01:00
committed by GitHub
parent c7f2b67297
commit 749cd11d33
94 changed files with 344 additions and 374 deletions

View File

@@ -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();
}
}
}