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

323 Commits

Author SHA1 Message Date
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
A_D
8dca6783fc Fixed spelling, added utility methods 2021-04-01 14:45:47 +01:00
A_D
d5b62d957b Added support for comments in kill switches 2021-04-01 14:45:47 +01:00
A_D
2d127ae3d0 Added docs, fixed incorrect kill switch names 2021-04-01 14:45:47 +01:00
A_D
d81093760e Added hooks into killswitches in plugins 2021-04-01 14:45:47 +01:00
A_D
1e56f0046e Empty journal dir workaround 2021-04-01 14:45:46 +01:00
A_D
a1576e9979 Fixed missing default keyword arg 2021-04-01 14:45:46 +01:00
A_D
278480b99f replaced ors with defaults in config usage 2021-04-01 14:45:46 +01:00
Athanasius
25852997c5 Updated all source to use new config methods
# Conflicts:
#	monitor.py
2021-04-01 14:45:46 +01:00
Athanasius
bd670b7ff1 Updated plugins to expect that CAPI data is safe
# Conflicts:
#	plugins/eddn.py
2021-04-01 14:45:45 +01:00
Athanasius
983e4d7acb plugins/eddn: Detailed stop logging. 2021-04-01 14:45:44 +01:00
Athanasius
96bb0959f5 EDDN: Only add missing StarPos if for current system
<https://github.com/EDCD/EDMarketConnector/issues/961>

It seems the game can report a Scan event *after* you've jumped to
another system.  So don't blindly set StarPos on Scan, check the
SystemAddress against where we think we are first.
2021-04-01 08:56:35 +01:00
Athanasius
aab2a58a2d Reduce some log spam:
* Comment out the traceback in plugins/eddn.py, the return is enough.
* 'Called with no event_queue' can be TRACE.
* Don't care about "Everything was alright, the near-neutral status just
  wasn't stored." from Inara.
2021-03-23 13:48:44 +00:00
Athanasius
b4d928246e Adjust logging to include type (and not strictly False). 2021-03-22 11:48:52 +00:00
Athanasius
34c0536a7e Paranoia check in sendreplay().
See #926
2021-03-22 11:43:44 +00:00
Athanasius
6bde36ad31 Extend is_horizons() paranoia to type of ships['shipyard_list']
The .values() is on this, so it also needs to be a dict.

I also made the logging of "FC or Damaged Station?" consistent
throughout this file.

Yes, we'll keep these as logger.debug() for now.
2021-03-17 11:26:34 +00:00