EDCD / EDDI

Companion application for Elite Dangerous
Other
437 stars 81 forks source link

RouteDetails('update') weird results. Bug? #2586

Open Darkcyde13 opened 9 months ago

Darkcyde13 commented 9 months ago

What's Wrong (please be as specific as possible)

Expected

RouteDetails('update') to update to the next destination system and remove the competed system from the route.

Observed

Origin system is added twice, once at the start, and once at the end, of the refreshed route. CG system is also removed from the route.

Steps to reproduce

  1. Take some missions.
  2. Run RouteDetails('route') and check the resulting route.
  3. Travel to initial system and complete the mission.
  4. Run RouteDetails('update') and check the resulting route.

Configuration

My Investigation

Investigation Notes

I'm looking into moving over to using the EDDI default RouteDetails() to replace my version of mission routing. In testing this out, I think I've found a bug in RouteDetails().

I took three missions (although I have four as I already had the current CG too). I then ran my routing to see what results I got, and then ran RouteDetails() to compare. The total distance was different, but the route was the same, so I'm not sure why the distance was different.

On completing the first mission, I ran RouteDetails('update') to see what would happen. At first, nothing happened at all, so I tried RouteDetails('set'), then 'update' again. This time it set the next destination as expected.

However, on checking the actual route, it had removed the wrong(?) system and added the origin system twice. For the below, I added List(event.route) to the end of the Route details script.

This is what I got in testing:

Take missions in Luyten 674-15 Run RouteDetails('route') List route = Cavins, Blatrimpe, Shamash, and Alpha Centauri Do first mission in Cavins Run RouteDetails('update') List route = Luyten 674-15, Cavins, Blatrimpe, Alpha Centauri, and Luyten 674-15

Shamash is the CG system. As you can see, it is present in the initial 'route', but missing from 'update', so I'm not sure if this is by design or not. Does 'route' count CG's, while 'update' ignores them? I had completed the mission in Cavins, and expected that to be removed, but it is still listed. I'm also not sure if the origin system should have been listed in the 'route' at the end (last destination) or not, but it is there after the 'update'.

So, does 'route' and 'update' work differently, or is this a bug and they should work the same? I would expect them to basically be the same, or at least produce the same route (minus the completed system).

I would also have thought that any completed mission destination would have been placed at the end, like it has in the above testing, but not add it at the beginning as well.

Could an option be added to 'route' to enable a 'return to origin' so that the origin system is added as a final destination and calculated in the overall route distance?

I going to run some more tests to see if I can get some more accurate details for this 'problem'. I'll finish my other missions and see what happens.

EDDI Logs

N/A

Player journals

N/A

Darkcyde13 commented 9 months ago

Looking over the speechout file, I've just realised that after completing the mission in Cavins and using 'update' to get the next destination, the distance was not updated. The distance reported was the old one from Luyten 674-15 to Cavins (12.3LY), instead of between Cavins and Blatrimpe (9.4LY). It was the same for Blatrimpe to Alpha Centauri, 12.3 instead of 34.3. It looks like the distance variable isn't being updated when RouteDetails() is run?