1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-18 09:57:40 +03:00

288 Commits

Author SHA1 Message Date
Athanasius
e1d547460b
EDDN: Add type hints back to new export_journal_entry() 2021-10-10 14:23:24 +01:00
Athanasius
ba20599511
EDDN: Make comment about removing odyssey flag a WORKAROUND
This is for the NavRoute handling.
2021-10-10 14:23:23 +01:00
Athanasius
0ffbb4dac9
EDDN: Send 'NavRoute' data on appropriate schema
Yes, there's some lovely mis-match between Mapping and Dict type to work
around.  Mapping complains about lack of __delitem__, so saying it's a
Dict instead and ensuring that matches at the call site.
2021-10-10 14:23:23 +01:00
Athanasius
7081a5a3ab
EDDN: Send ScanBaryCentre on correct schema 2021-10-10 14:23:23 +01:00
Athanasius
f97cf0897a
EDDN: Add CodexEntry on its own schema
This requires a tweak to `entry_augment_system_data()` as we now also
have 'System' as a possible key for a system name.
2021-10-10 14:23:23 +01:00
Athanasius
9c611d73d5
EDDN: TODO for dropping messages if we get a clear HTTP error
i.e. message not matching schema
2021-10-10 14:23:22 +01:00
Athanasius
413f9049f5
EDDN: Add support for NavBeaconScan on its own schema
* Refactors the augmentation code for use by both fssdiscoveryscan and
  navbeaconscan.
2021-10-10 14:23:22 +01:00
Athanasius
1dda61907b
EDDN: TODO on refactoring & return result of fssdiscoveryscan export 2021-10-10 14:23:22 +01:00
Athanasius
c4ba8acb17
EDDN: Add support for EDDN FSSDiscoveryScan schema from that event
* As we're now not sending *all* journal events on the journal schema
  this refactors only the actual sending in export_journal_entry(), with
  the other functionality in export_journal_generic(), so that the new
  export_journal_fssdiscoveryscan() can use export_journal_entry() as
  well.

In the future EDDN will move to a schema per event type, so we'll lose
_generic().  Factoring out some things like augmentations into their own
functions will come next.
2021-10-10 14:23:09 +01:00
Athanasius
e11b357502
EDDN: DEFAULT URL requires / on the end
The EDDN server config does NOT redirect from /upload to /upload/
2021-10-01 08:34:50 +01:00
Athanasius
f9875b5b9a
EDDN: Make use of new CL arg to use custom upload URL
This also entailed slightly reworking the way the EDDN code uses this
URL.  It was very generalised, so as to allow for the debug "just send
and log locally" code, but as the only URL is the 'upload' one much of
that seemed un-necessary.

So that code has been simplified.
2021-09-24 10:59:15 +01:00
Athanasius
c9d478222a
EDMC: Provide EDDN Odyssey flag from monitor state
This should have been set from the latest Journal file, and the
key/value is in LoadGame in Odyssey.  It's only documented as:

	"Whether the sending Cmdr has an Odyssey expansion."

in the current EDDN Journal schema.  Thus sending this as False if the
Cmdr last logged into Horizons/base game should be OK.
2021-08-24 13:52:48 +01:00
A_D
6c7245ee3d
updated eddn to new killswitches 2021-08-19 20:37:39 +02:00
Athanasius
79a2003b53
plugins/eddn: Use logger.trace_if(...) 2021-08-13 15:14:02 +01:00
A_D
fe0e752c9b
Added support for arbitrary plugins for POST debug
This works by replacing --eddn-local with --debug-sender, and making the
webserver more generic. support has been added to EDSM, EDDN, and INARA.
2021-06-18 23:36:42 +02:00
A_D
57d7889da9
Sorted imports 2021-06-18 23:34:26 +02:00
A_D
4ef153b1b2
Added fake EDDN Listener
A simple HTTP handler has been added that will dump any and all POST
data it gets to EDMC's log.

Additionally, a new command line argument to switch EDMC to using this
as its EDDN target has been added.
2021-06-18 23:34:20 +02:00
Athanasius
a0b310f72e Translations: Amalgamate some LANG comments & en.template updated 2021-06-13 15:49:09 +01:00
A_D
8d77cc039b Added LANG comments for EDDN localisation 2021-06-10 20:29:11 +01:00
A_D
17980ac6ad
Added localisation 2021-06-07 18:10:25 +02:00
A_D
e6c8183bfc
made EDDN errors more verbose 2021-06-07 18:09:18 +02:00
Athanasius
4fa0521438 other core plugins: LANG comment pass 2021-06-07 15:43:32 +01:00
Athanasius
b862f6b00a Translations: Add killswitch 'disabled' messages. 2021-05-17 10:18:04 +01:00
Athanasius
cba2f32cef plugins/eddn: export_journal_entry didn't have is_odyssey arg added 2021-05-15 08:17:58 +01:00
Athanasius
58c740bc6c plugins/eddn: Set odyssey flag in extra messages
1. journal outfitting
2. journal shipyard
3. journal commodities

As these are sourced from the additional .json files via a load over
`entry` contents we need to re-set `entry['odyssey']` and then make sure
we use it.
2021-05-12 18:18:41 +01:00
Athanasius
86a17e5e4c plugins/eddn: Utilise this.odyssey to augment CAPI-sourced messages
NB: Currently EDDN gateway doesn't have the updated schemas, so the
export_commodities() throws an exception and thus neither outfitting or
shipyard exports are even attempted.
2021-05-12 17:55:20 +01:00
Athanasius
8dfd638f28 plugins/eddn: Store Odyssey boolean in This state.
This is so we can access it in cmdr_data() as well.
2021-05-12 17:29:15 +01:00
Athanasius
97a6d07c51 plugins/eddn: Send bool 'odyssey' in all event messages.
This is so listeners can make decision on if/how/when to store data that
might be from base/horizons or Odyssey.
2021-05-12 17:14:58 +01:00
Athanasius
22dbd4e048 EDDN: Fix building of "ships this station sells" list.
This likely hadn't been tested since a rewrite due to pre-Odyssey alpha
having broken CAPI without shipyard_list on normal stations.
2021-04-12 08:31:48 +01:00
Athanasius
5edf8d5b59 Change monitor.state['on_foot'] to 'OnFoot' for consistency 2021-04-12 08:30:51 +01:00
Athanasius
567cfdb9ca Will now send data to EDDN when on-foot in-station.
NB: No shipyard in tests because data['ships']['shipyard_list'] is an
empty list.  This might be the bug not having been fixed, or the station
might genuinely have no ships for sale.  We have no way to check in
Odyssey Alpha Phase 1.
2021-04-12 08:30:51 +01:00
Athanasius
b0bda6e982 EDDN: Convert appversion_nobuild() to str
Without this the JSON serialisation later on barfs on it.
2021-04-01 14:46:43 +01:00
Athanasius
567bda048d plugins/eddn: Ensure types on all 'this' variables. 2021-04-01 14:45:53 +01:00
Athanasius
501682c439 Split text following """ if entire docstring not single line. 2021-04-01 14:45:53 +01:00
Athanasius
7da15faaf3 plugins/eddn: Convert 'this' to a class for typing reasons.
* Typing hates the 'this' hack on module's __name__, so use a small
  class instead.
* Added missing `return None`s.
* Other typing cleanups.
2021-04-01 14:45:53 +01:00
Athanasius
921185f7ce plugins/eddn: Now fully docstring'ed. 2021-04-01 14:45:53 +01:00
Athanasius
2f9789afdd Update all code to use config.appversion() as a function
This *also* caught some instances where appversion_nobuild should
already have been used, so those were both changed and updated to a
function call.
2021-04-01 14:45:52 +01:00
Athanasius
f0c6b9efaa EDDN: Minor logging and format fixup to match 4.2.4 2021-04-01 14:45:52 +01:00
Athanasius
9a8daf665e EDDN: Restore 4.2.4 is_horizons() check in full 2021-04-01 14:45:52 +01:00
Athanasius
63be402cb4 EDDN: Restore safe_modules_and_ships() from 4.2.4 2021-04-01 14:45:52 +01:00
Athanasius
bc33bf1b19 Attempt to get develop back to code state before rebase on main. 2021-04-01 14:45:51 +01:00
Athanasius
d8fb17df9f plugins/eddn: Add paranoia about data in is_horizons()
A damaged station has `"modules": []`, so trips over modules.values().
2021-04-01 14:45:51 +01:00
Athanasius
933ec723bd plugins/eddn: Call requests.Session.close() in EDDN.close()
Avoids a `-W default` warning on shutdown.
2021-04-01 14:45:50 +01:00
A_D
051245cf90 Renamed various config values to be backwards compatible 2021-04-01 14:45:48 +01:00
A_D
00629b7420 use _str versions of paths for string ops 2021-04-01 14:45:48 +01:00
A_D
b5a8c03980 Added missing whitespace 2021-04-01 14:45:48 +01:00
A_D
cd67f12f22 Fixed eddn event specific killswitch 2021-04-01 14:45:48 +01:00
A_D
b694bdc965 Added per-event killswitch 2021-04-01 14:45:48 +01:00
A_D
6374fbbeb8 Added event disabling
You can now disable specific event handlers in plugins
2021-04-01 14:45:47 +01:00
A_D
70087a27e4 Added total journal cutoff killswitches 2021-04-01 14:45:47 +01:00