protected override List <EntityUid> GetTrueValue() { var result = new List <EntityUid>(); var entMan = IoCManager.Resolve <IEntityManager>(); if (!entMan.TryGetComponent(Owner, out NPCComponent? controller)) { return(result); } foreach (var entity in Visibility .GetNearestEntities(entMan.GetComponent <TransformComponent>(Owner).Coordinates, typeof(FoodComponent), controller.VisionRadius)) { if (entity.TryGetContainer(out var container)) { if (!entMan.HasComponent <EntityStorageComponent>(container.Owner)) { continue; } } result.Add(entity); } return(result); }
protected override List<EntityUid> GetTrueValue() { var result = new List<EntityUid>(); var entMan = IoCManager.Resolve<IEntityManager>(); if (!entMan.TryGetComponent(Owner, out AiControllerComponent? controller)) { return result; } foreach (var entity in Visibility.GetNearestEntities(entMan.GetComponent<TransformComponent>(Owner).Coordinates, typeof(MeleeWeaponComponent), controller.VisionRadius)) { result.Add(entity); } return result; }
protected override List <IEntity> GetTrueValue() { var result = new List <IEntity>(); if (!Owner.TryGetComponent(out AiControllerComponent controller)) { return(result); } foreach (var entity in Visibility .GetNearestEntities(Owner.Transform.Coordinates, typeof(MeleeWeaponComponent), controller.VisionRadius)) { result.Add(entity); } return(result); }
public override List <IEntity> GetValue() { var result = new List <IEntity>(); if (!Owner.TryGetComponent(out AiControllerComponent controller)) { return(result); } foreach (var entity in Visibility .GetNearestEntities(Owner.Transform.GridPosition, typeof(HitscanWeaponComponent), controller.VisionRadius)) { result.Add(entity); } return(result); }
public override List <IEntity> GetValue() { var nearby = new List <IEntity>(); if (!Owner.TryGetComponent(out AiControllerComponent controller)) { return(nearby); } foreach (var result in Visibility .GetNearestEntities(Owner.Transform.GridPosition, typeof(WeaponCapacitorChargerComponent), controller.VisionRadius)) { nearby.Add(result); } return(nearby); }
protected override List <IEntity> GetTrueValue() { var result = new List <IEntity>(); if (!Owner.TryGetComponent(out AiControllerComponent? controller)) { return(result); } foreach (var entity in Visibility .GetNearestEntities(Owner.Transform.Coordinates, typeof(DrinkComponent), controller.VisionRadius)) { if (entity.TryGetContainer(out var container)) { if (!container.Owner.HasComponent <EntityStorageComponent>()) { continue; } } result.Add(entity); } return(result); }
protected override List <IEntity> GetTrueValue() { var result = new List <IEntity>(); if (!Owner.TryGetComponent(out AiControllerComponent controller)) { return(result); } foreach (var entity in Visibility .GetNearestEntities(Owner.Transform.GridPosition, typeof(ClothingComponent), controller.VisionRadius)) { if (ContainerHelpers.TryGetContainer(entity, out var container)) { if (!container.Owner.HasComponent <EntityStorageComponent>()) { continue; } } result.Add(entity); } return(result); }