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

@@ -6,17 +6,17 @@ namespace Content.Client.GameObjects.Components.Wires
{
public class WiresBoundUserInterface : BoundUserInterface
{
private WiresMenu? _menu;
public WiresBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
{
}
private WiresMenu _menu;
protected override void Open()
{
base.Open();
_menu = new WiresMenu(this);
_menu = new WiresMenu(this);
_menu.OnClose += Close;
_menu.OpenCentered();
}
@@ -24,7 +24,7 @@ namespace Content.Client.GameObjects.Components.Wires
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
_menu.Populate((WiresBoundUserInterfaceState) state);
_menu?.Populate((WiresBoundUserInterfaceState) state);
}
public void PerformAction(int id, WiresAction action)
@@ -38,7 +38,7 @@ namespace Content.Client.GameObjects.Components.Wires
if (!disposing)
return;
_menu.Dispose();
_menu?.Dispose();
}
}
}