Fixing warnings (#8131)
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Threading;
|
||||
using Content.Server.AI.Components;
|
||||
using Content.Server.AI.EntitySystems;
|
||||
using Content.Server.AI.LoadBalancer;
|
||||
@@ -11,12 +7,9 @@ using Content.Server.AI.WorldState;
|
||||
using Content.Server.AI.WorldState.States.Utility;
|
||||
using Content.Server.CPUJob.JobQueues;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Server.AI.Utility.AiLogic
|
||||
{
|
||||
@@ -24,7 +17,7 @@ namespace Content.Server.AI.Utility.AiLogic
|
||||
[RegisterComponent]
|
||||
[ComponentProtoName("UtilityAI")]
|
||||
[ComponentReference(typeof(AiControllerComponent)), ComponentReference(typeof(IMoverComponent))]
|
||||
public sealed class UtilityAi : AiControllerComponent, ISerializationHooks
|
||||
public sealed class UtilityAi : AiControllerComponent
|
||||
{
|
||||
// TODO: Look at having ParallelOperators (probably no more than that as then you'd have a full-blown BT)
|
||||
// Also RepeatOperators (e.g. if we're following an entity keep repeating MoveToEntity)
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.AI.Utils;
|
||||
using Content.Server.Clothing.Components;
|
||||
using Content.Server.Storage.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -24,10 +25,10 @@ namespace Content.Server.AI.WorldState.States.Clothing
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var containerSystem = IoCManager.Resolve<ContainerSystem>();
|
||||
foreach (var entity in Visibility.GetNearestEntities(entMan.GetComponent<TransformComponent>(Owner).Coordinates, typeof(ClothingComponent), controller.VisionRadius))
|
||||
{
|
||||
if (entity.TryGetContainer(out var container))
|
||||
if (containerSystem.TryGetContainingContainer(entity, out var container))
|
||||
{
|
||||
if (!entMan.HasComponent<EntityStorageComponent>(container.Owner))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user