Avoid collisions with stations and other grids when returning from expedition. While this should avoid stations without issue, anybody driving into the blue FTL circles will still cause an issue, and asteroid/wreck generation may still cause problems.
This code is mostly copied from the NfAdventureSystem, although changed to consider grids instead of stations. Could probably use a refactor.
With the parameters as-is on the time of writing, assuming 40 ships and shuttles with no overlap, the chance of finding a vacant position is ~86%: 40*pi*200^2 / (pi*3500^2 - pi*750^2). Repeating 20 times, this reduces to a ~5e-18 chance of success on placing a single ship. Feeling lucky?
Why / Balance
Ship collisions are rare, but unfortunate when they happen, and possibly round-ruining without intervention.
How to test
On the 2024-08-14-improve-exped-ftl-janky-testbench (diff here - GitHub), the shipyard console FTLs you to a random location on the map when pressing the "Cruise" button on the shuttle console (for any ship), with reduced spool up and transit time.
About the PR
Avoid collisions with stations and other grids when returning from expedition. While this should avoid stations without issue, anybody driving into the blue FTL circles will still cause an issue, and asteroid/wreck generation may still cause problems.
This code is mostly copied from the NfAdventureSystem, although changed to consider grids instead of stations. Could probably use a refactor.
With the parameters as-is on the time of writing, assuming 40 ships and shuttles with no overlap, the chance of finding a vacant position is ~86%: 40*pi*200^2 / (pi*3500^2 - pi*750^2). Repeating 20 times, this reduces to a ~5e-18 chance of success on placing a single ship. Feeling lucky?
Why / Balance
Ship collisions are rare, but unfortunate when they happen, and possibly round-ruining without intervention.
How to test
On the 2024-08-14-improve-exped-ftl-janky-testbench (diff here - GitHub), the shipyard console FTLs you to a random location on the map when pressing the "Cruise" button on the shuttle console (for any ship), with reduced spool up and transit time.
Media
Breaking changes
Changelog
:cl: