Fix #5713: Use pathfinder to find closest ship depot #6928
Conversation
|
I don't like this approach at all. It's far too intrusive and adds far too many special cases to the pathfinding code, which is already very complex. Start over with something simpler that doesn't need to change code in all the pathfinders. |
|
An idea for an alternate approach could be to insert the logic in Of course that won't handle the case of OPF, since that never signals no path found. I would suggest not doing anything about that for now, but maybe make a separate change that keeps track of how far a ship has sailed since it last completed an order, and compare that to the expected distance, and send a warning to the player if the ship appears to be taking too long. |
|
I tried implementing the approach I outlined above, it's probably not complete like this, but it's significantly shorter and touches much less code: nielsmh@fd90477 |
|
We recently switched from Jenkins as CI to Azure Pipelines as CI. This means you need to rebase before this Pull Request will pass its checks. Sorry for the troubles! |
e556519
to
b8b7878
|
@nielsmh @J0anJosep has already implemented part of what I had in mind for npf, which got into master, and some of the complexity that was on npf.cpp is gone. Unless you mean the other changes... |
b8b7878
to
e4a026e
|
Still think this looks like too much complexity to attempt to improve a few corner cases. |
3060a64
to
a5c5df2
|
NoNoCAB v5 (O) 1.7.2.zip |
a5c5df2
to
74e3985
4ba1fe3
to
7a9d5c1
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
7a9d5c1
to
9ad74e8
|
Just resolved conflicts |
|
This one appears to be stuck, and reviewers are finding it difficult to providing constructive reviews. Also it appears difficult to be confident that the solutions proposed are correct. On this basis I am closing this one. Thanks for contributing! |
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder (Original, NPF or Yapf) first. Only if it fails, it would then be provided by the original method, distance manhattan based.
https://www.tt-forums.net/viewtopic.php?f=33&t=76137