Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Content.Client.GameObjects.Components.CloningPod
|
||||
base.Open();
|
||||
|
||||
|
||||
_window = new CloningPodWindow(new Dictionary<int, string>());
|
||||
_window = new CloningPodWindow(new Dictionary<int, string?>());
|
||||
_window.OnClose += Close;
|
||||
_window.CloneButton.OnPressed += _ =>
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Content.Client.GameObjects.Components.CloningPod
|
||||
{
|
||||
public sealed class CloningPodWindow : SS14Window
|
||||
{
|
||||
private Dictionary<int, string> _scanManager;
|
||||
private Dictionary<int, string?> _scanManager;
|
||||
|
||||
private readonly VBoxContainer _scanList;
|
||||
public readonly Button CloneButton;
|
||||
@@ -21,11 +21,11 @@ namespace Content.Client.GameObjects.Components.CloningPod
|
||||
private readonly ProgressBar _cloningProgressBar;
|
||||
private readonly Label _mindState;
|
||||
|
||||
private CloningPodBoundUserInterfaceState _lastUpdate = null!;
|
||||
private CloningPodBoundUserInterfaceState? _lastUpdate;
|
||||
|
||||
public int? SelectedScan;
|
||||
|
||||
public CloningPodWindow(Dictionary<int, string> scanManager)
|
||||
public CloningPodWindow(Dictionary<int, string?> scanManager)
|
||||
{
|
||||
SetSize = MinSize = (250, 300);
|
||||
_scanManager = scanManager;
|
||||
@@ -120,7 +120,7 @@ namespace Content.Client.GameObjects.Components.CloningPod
|
||||
{
|
||||
var button = new CloningScanButton
|
||||
{
|
||||
Scan = scan.Value,
|
||||
Scan = scan.Value ?? string.Empty,
|
||||
Id = scan.Key
|
||||
};
|
||||
button.ActualButton.OnToggled += OnItemButtonToggled;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Client.GameObjects.Components.Interactable
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)] private bool _uiUpdateNeeded;
|
||||
[ViewVariables] public bool StatusShowBehavior => _statusShowBehavior;
|
||||
[ViewVariables] public ToolQuality Behavior => _behavior;
|
||||
[ViewVariables] public ToolQuality? Behavior => _behavior;
|
||||
|
||||
public override string Name => "MultiTool";
|
||||
public override uint? NetID => ContentNetIDs.MULTITOOLS;
|
||||
@@ -63,11 +63,7 @@ namespace Content.Client.GameObjects.Components.Interactable
|
||||
|
||||
_parent._uiUpdateNeeded = false;
|
||||
|
||||
if(!_parent.StatusShowBehavior)
|
||||
_label.SetMarkup(string.Empty);
|
||||
else
|
||||
_label.SetMarkup(_parent.Behavior.ToString());
|
||||
|
||||
_label.SetMarkup(_parent.StatusShowBehavior ? _parent.Behavior.ToString() ?? string.Empty : string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Content.Client.GameObjects.Components.Mobs
|
||||
|
||||
private void UpdateLooks()
|
||||
{
|
||||
if (Appearance is null ||
|
||||
if (Appearance is null! ||
|
||||
!Owner.TryGetComponent(out SpriteComponent? sprite))
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user