Fix nullable build errors (#1849)
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
if (!container.Owner.TryGetComponent(out EntityStorageComponent storageComponent) ||
|
||||
if (!container.Owner.TryGetComponent(out EntityStorageComponent? storageComponent) ||
|
||||
storageComponent.IsWeldedShut)
|
||||
{
|
||||
return Outcome.Failed;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
if (!_owner.TryGetComponent(out HandsComponent handsComponent))
|
||||
if (!_owner.TryGetComponent(out HandsComponent? handsComponent))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
public override Outcome Execute(float frameTime)
|
||||
{
|
||||
// TODO: Also have this check storage a la backpack etc.
|
||||
if (!_owner.TryGetComponent(out HandsComponent handsComponent))
|
||||
if (!_owner.TryGetComponent(out HandsComponent? handsComponent))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
if (!_target.TryGetComponent(out ItemComponent itemComponent))
|
||||
if (!_target.TryGetComponent(out ItemComponent? itemComponent))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user