26 if (!
Global.
getSector().getCurrentLocation().isHyperspace())
return null;
29 WeightedRandomPicker<SectorEntityToken> picker =
new WeightedRandomPicker<SectorEntityToken>(manager.
getRandom());
33 for (SectorEntityToken curr : hyper.getEntitiesWithTag(Tags.NEUTRINO_HIGH)) {
34 if (curr.isPlayerFleet())
continue;
35 float distLY = Misc.getDistanceLY(curr.getLocation(), pf.getLocationInHyperspace());
41 float distLY = Misc.getDistanceLY(system.getLocation(), pf.getLocationInHyperspace());
45 for (SectorEntityToken curr : system.getEntitiesWithTag(Tags.NEUTRINO_HIGH)) {
46 if (curr.hasTag(Tags.OBJECTIVE))
continue;
47 if (score == 0) score = 1f;
51 if (score > 0 && system.getHyperspaceAnchor() !=
null) {
52 picker.add(system.getHyperspaceAnchor(), score);
56 for (SectorEntityToken item :
new ArrayList<SectorEntityToken>(picker.getItems())) {
58 pf.getLocation(), item.getLocation())) {
64 SectorEntityToken target = picker.pick();
65 if (target ==
null)
return null;
67 List<SensorGhost> result =
new ArrayList<SensorGhost>();