1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

CAPI/EDDN: Enable sending of Legacy data

As we already took some care in the EDDN code we can just make
`cmdr_data_legacy()` call through to `cmdr_data()`.
This commit is contained in:
Athanasius 2022-12-08 12:10:15 +00:00
parent ccdc187efa
commit 0915bad95d
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -2408,9 +2408,28 @@ def journal_entry( # noqa: C901, CCR001
return None
def cmdr_data_legacy(data: CAPIData, is_beta: bool) -> Optional[str]:
"""
Process new CAPI data for Legacy galaxy.
Ensuring the correct EDDN `header->gameversion` is achieved by use of
`EDDN.capi_gameversion_from_host_endpoint()` in:
`EDDN.export_outfitting()`
`EDDN.export_shipyard()`
`EDDN.export_outfitting()`
Thus we can just call through to the 'not Legacy' version of this function.
:param data: CAPI data to process.
:param is_beta: bool - True if this is a beta version of the Game.
:return: str - Error message, or `None` if no errors.
"""
return cmdr_data(data, is_beta)
def cmdr_data(data: CAPIData, is_beta: bool) -> Optional[str]: # noqa: CCR001
"""
Process new CAPI data.
Process new CAPI data for not-Legacy galaxy (might be beta).
:param data: CAPI data to process.
:param is_beta: bool - True if this is a beta version of the Game.