Fix some build warnings (#6832)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -87,8 +87,6 @@ namespace Content.Server.AI.Commands
|
||||
shell.WriteLine(Loc.GetString("faction-command-unknown-faction-argument-error"));
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace Content.Server.AI.Steering
|
||||
{
|
||||
// http://www.red3d.com/cwr/papers/1999/gdc99steer.html for a steering overview
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IPauseManager _pauseManager = default!;
|
||||
[Dependency] private readonly PathfindingSystem _pathfindingSystem = default!;
|
||||
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
@@ -264,7 +263,7 @@ namespace Content.Server.AI.Steering
|
||||
return SteeringStatus.NoPath;
|
||||
}
|
||||
|
||||
if (_pauseManager.IsGridPaused(EntityManager.GetComponent<TransformComponent>(entity).GridID))
|
||||
if (_mapManager.IsGridPaused(EntityManager.GetComponent<TransformComponent>(entity).GridID))
|
||||
{
|
||||
controller.VelocityDir = Vector2.Zero;
|
||||
return SteeringStatus.Pending;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Content.Server.AI.Utility.Actions.Idle
|
||||
{
|
||||
var lastStorage = context.GetState<LastOpenedStorageState>().GetValue();
|
||||
|
||||
if (lastStorage == null)
|
||||
if (!lastStorage.IsValid())
|
||||
{
|
||||
ActionOperators = new Queue<AiOperator>(new AiOperator[]
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Server.AI.Utility.Considerations.Hands
|
||||
{
|
||||
var owner = context.GetState<SelfState>().GetValue();
|
||||
|
||||
if (owner == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(owner, out HandsComponent? handsComponent))
|
||||
if (!owner.IsValid() || !IoCManager.Resolve<IEntityManager>().TryGetComponent(owner, out HandsComponent? handsComponent))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.AI.Utility.Considerations.State
|
||||
}
|
||||
|
||||
context.GetStoredState(stateData, out StoredStateData<EntityUid> state);
|
||||
return state.GetValue() == null ? 1.0f : 0.0f;
|
||||
return !state.GetValue().IsValid() ? 1.0f : 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user