Enable nullability in Content.Client (#3257)

* Enable nullability in Content.Client

* Remove #nullable enable

* Merge fixes

* Remove Debug.Assert

* Merge fixes

* Fix build

* Fix build
This commit is contained in:
DrSmugleaf
2021-03-10 14:48:29 +01:00
committed by GitHub
parent 4f9bd4e802
commit 902aa128c2
270 changed files with 1774 additions and 1550 deletions

View File

@@ -24,7 +24,7 @@ namespace Content.Client.UserInterface
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
[Dependency] private readonly IClientGameTicker _gameTicker = default!;
public event Action<string> SelectedId;
public event Action<string>? SelectedId;
private readonly Dictionary<string, JobButton> _jobButtons = new();
private readonly Dictionary<string, VBoxContainer> _jobCategories = new();
@@ -96,10 +96,7 @@ namespace Content.Client.UserInterface
jobList.AddChild(category);
}
var jobButton = new JobButton
{
JobId = job.ID
};
var jobButton = new JobButton(job.ID);
var jobSelector = new HBoxContainer
{
@@ -176,9 +173,11 @@ namespace Content.Client.UserInterface
class JobButton : ContainerButton
{
public string JobId { get; set; }
public JobButton()
public string JobId { get; }
public JobButton(string jobId)
{
JobId = jobId;
AddStyleClass(StyleClassButton);
}
}