phkb wrote: ↑Thu May 09, 2024 10:31 am
This definitely seems to be related to Telescope ...
Relax, you don't need to dive into Telescope. The problem arises from
$findShipsWithBeacons() including the player's ship's visual target in the list it returns. It's created w/
system.addVisualEffect (which copies beaconCode), not
system.addShips but gets included in your
system.filteredEntities call because
_beacons() lets it through.
Adding the test
!entity.isVisualEffect should stop it. If you want to include planets & moons, you can test
entity.radius , as the orbs have that property but ships do not, or .scanClass === "CLASS_NO_DRAW".
There is another problem though, EscortDeck. All these ships have beacons and are close to player & thus flood the MFD's output. Some escort properties:
Code: Select all
AI: "EscortDeck_AI.plist"
beaconCode: "E0 Adder Escort"
beaconLabel: "E"
escortGroup: [OOShipGroup "escort group", 1 ships, leader: <ShipEntity 0x5bd7de10>{"Adder Escort"}]
There's also towbar:
Code: Select all
ws.$TowbarShip.beaconCode = "D"; //Derelict
ws.$TowbarShip.beaconLabel = "Derelict "+ws.$TowbarShip.displayName.replace("Derelict ",""); //Derelict
Plus anarchies, curse_of_the_black_sunspot, farplanets, galcopmissions, in-system_taxi, galacticalmanac (many ships), planetary_compass (planets & moons), rockhermitbeacons, satellites, ship_storage_helper, smugglers, sotl_exploration, starsystemlaneindicator, thecollector, tracker & yah, which all assign beaconCode and/or beaconLabel. This is not an exhaustive list, as I've yet to update my local copy of all the oxz files from the new site - my internet is that bad! (had to show off my oxz friendly search in a debug console coming soon

)
Perhaps using
system.entitiesWithScanClass instead of
system.filteredEntities would be simpler. If you only want buoys,
system.entitiesWithScanClass('CLASS_BUOY', player.ship) gives you a distance sorted list. Same w/ CLASS_STATION; you'd just have to merge the 2 lists. You'd have time as
entitiesWithScanClass is much faster than
filteredEntities . If, however, you'd like to include any ships with beacons, well, nevermind.
P.S. I would have chimed in earlier but I'm not receiving any email notification except for private messages.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.