Fix 3000 errors
This commit is contained in:
@@ -14,10 +14,10 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
/// </summary>
|
||||
public sealed class CloseLastStorageOperator : AiOperator
|
||||
{
|
||||
private readonly IEntity _owner;
|
||||
private IEntity? _target;
|
||||
private readonly EntityUid _owner;
|
||||
private EntityUid _target;
|
||||
|
||||
public CloseLastStorageOperator(IEntity owner)
|
||||
public CloseLastStorageOperator(EntityUid owner)
|
||||
{
|
||||
_owner = owner;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
|
||||
_target = blackboard.GetState<LastOpenedStorageState>().GetValue();
|
||||
|
||||
return _target != null;
|
||||
return _target != default;
|
||||
}
|
||||
|
||||
public override bool Shutdown(Outcome outcome)
|
||||
@@ -48,13 +48,13 @@ namespace Content.Server.AI.Operators.Inventory
|
||||
|
||||
var blackboard = UtilityAiHelpers.GetBlackboard(_owner);
|
||||
|
||||
blackboard?.GetState<LastOpenedStorageState>().SetValue(null);
|
||||
blackboard?.GetState<LastOpenedStorageState>().SetValue(default);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override Outcome Execute(float frameTime)
|
||||
{
|
||||
if (_target == null || !_owner.InRangeUnobstructed(_target, popup: true))
|
||||
if (_target == default || !_owner.InRangeUnobstructed(_target, popup: true))
|
||||
{
|
||||
return Outcome.Failed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user