EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
987 stars 155 forks source link

[2228] Handle Unknown FSD Ranges #2230

Closed Rixxan closed 1 month ago

Rixxan commented 1 month ago

Description

This PR addresses the first of probably many issues that will be presented by Elite: Dangerous update 18.04. This issue is due to the fact that the exact details of the new frameshift drive modules are not in any of the sources that EDMC uses, and is required to calculate a user's jump range when using the new SCO modules.

The eventual fix for this will need to come in multiple stages. First, the exact module details for each of the SCO modules (including any changes to the fuelmul and fuelpower constants) will need to be extracted. For EDMC, we use Coriolis's data library for this information.

Once those numbers are known, they'll need to be added to Coriolis (this is simple to do, just time-consuming for the nearly 40 modules). That will come in a later PR.

Without these updated numbers, we won't be able to determine the exact numbers of laden, unladen, and other jump range details. As such, we'll be filling these values with temporary placeholders of 0.0 if we can't figure out the range from the existing data.

This PR implements a check for these missing modules and prevents a crash of EDMC when attempting to parse the data when not present.

This PR also includes a few of the details that will be present in the Python Mk II but does not add total support for the vessel. Additionally, fixes a bug that would occur when using the new SCO modules.

Type of Change

How Tested

Tested with reporting conditions from #2228, to ensure the crash does not occur.

Notes

Related to, but does not close, #2228

Rixxan commented 1 month ago

Since EDMC may crash if these details are not known under certain circumstances, going ahead with this one immediately.