mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 11:32:20 +00:00
* Fix modsuit pathfinder module / JPS changes (#81983) ## About The Pull Request The Pathfinder module sucks cock because it doesn't work. And the reasons it doesn't work are as follows: 1. It uses the default JPS pathfinding datum, which has a hard distance limit of 30, instead of the intended 200. 2. JPS pathfinding as a whole will fail if you encounter more than 3 doors. This is because every door wastes about 5 movement opportunities, and the default pathfinder only has a limit of 20 before it considers the entire pathfinding attempt moot and bails out. Here's how I fixed it: 1. Created a new jps child that has a range of MOD_AI_RANGE 2. Instead of counting all failures during the entire pathfinding attempt, it will only consider consecutive failures. Every successful move will reset the pathfinding failure count. This should make JPS pathfinding more reliable overall? ## Changelog 🆑 fix: Modsuit Pathfinder module is significantly better at finding it's destination. /🆑 * Fix modsuit pathfinder module / JPS changes --------- Co-authored-by: Kapu1178 <75460809+Kapu1178@users.noreply.github.com>