Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -1,5 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Content.Server.GameObjects.Components.Items.Storage;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Localization;
@@ -14,7 +14,7 @@ namespace Content.Server.GameObjects.Components.GUI
{
public override string Name => "HumanInventoryController";
private InventoryComponent _inventory;
private InventoryComponent _inventory = default!;
public override void Initialize()
{
@@ -23,7 +23,7 @@ namespace Content.Server.GameObjects.Components.GUI
_inventory = Owner.EnsureComponent<InventoryComponent>();
}
bool IInventoryController.CanEquip(Slots slot, IEntity entity, bool flagsCheck, out string reason)
bool IInventoryController.CanEquip(Slots slot, IEntity entity, bool flagsCheck, [NotNullWhen(false)] out string? reason)
{
var slotMask = SlotMasks[slot];
reason = null;
@@ -59,7 +59,7 @@ namespace Content.Server.GameObjects.Components.GUI
return flagsCheck;
}
public override void HandleMessage(ComponentMessage message, IComponent component)
public override void HandleMessage(ComponentMessage message, IComponent? component)
{
base.HandleMessage(message, component);