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:
@@ -29,9 +29,9 @@ namespace Content.Client.GameObjects.Components.Actor
|
||||
/// <remarks>
|
||||
/// Null if it would otherwise be empty.
|
||||
/// </remarks>
|
||||
public SS14Window Window { get; private set; }
|
||||
public CharacterWindow? Window { get; private set; }
|
||||
|
||||
private List<ICharacterUI> _uiComponents;
|
||||
private List<ICharacterUI>? _uiComponents;
|
||||
|
||||
/// <summary>
|
||||
/// Create the window with all character UIs and bind it to a keypress
|
||||
@@ -58,10 +58,13 @@ namespace Content.Client.GameObjects.Components.Actor
|
||||
{
|
||||
base.OnRemove();
|
||||
|
||||
foreach (var component in _uiComponents)
|
||||
if (_uiComponents != null)
|
||||
{
|
||||
// Make sure these don't get deleted when the window is disposed.
|
||||
component.Scene.Orphan();
|
||||
foreach (var component in _uiComponents)
|
||||
{
|
||||
// Make sure these don't get deleted when the window is disposed.
|
||||
component.Scene.Orphan();
|
||||
}
|
||||
}
|
||||
|
||||
_uiComponents = null;
|
||||
@@ -73,7 +76,7 @@ namespace Content.Client.GameObjects.Components.Actor
|
||||
inputMgr.SetInputCommand(ContentKeyFunctions.OpenCharacterMenu, null);
|
||||
}
|
||||
|
||||
public override void HandleMessage(ComponentMessage message, IComponent component)
|
||||
public override void HandleMessage(ComponentMessage message, IComponent? component)
|
||||
{
|
||||
base.HandleMessage(message, component);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user