Commit Graph
180 Commits
Author SHA1 Message Date
Athanasius ef1642181a monitor/tracking: Move .stationtype to state['StationType']
* Nothing outside of monitor.py uses this, but it's of the same nature as
  StationName and MarketID, so do this for consistency.

For now we'll leave monitor.stationservices as-is.
2023-01-11 19:44:45 +00:00
Athanasius 31e8d0372d monitor/tracking: Move .station_marketid to state['MarketID']
1. plugins/eddb.py uses this for MarketID-based station URLs.

* So do the 'rename'.
* Remove EDDB tracking in favour of this.
* Update PLUGINS.md
2023-01-11 19:44:44 +00:00
Athanasius dde0cf876c monitor/tracking: Move .station to state['StationName']
1. EDDB tracks this.

* So move monitor.station to monitor.state['StationName'].
* PLUGINS.md updated to cite this.
2023-01-11 19:44:41 +00:00
Athanasius df5eb5b270 monitor/tracking: Switch .systempopulation to state['SystemPopulation']
1. EDDB plugin tracked this for keeping the Station link text up to date.

* So moved it to monitor.state['SystemPopulation'].
* PLUGINS.md updated to cite this.
* PLUGINS.md also updated to note state entries that are set to None if
  remote multi-crew is detected.
2023-01-11 19:44:14 +00:00
Athanasius b1308e4f28 PLUGINS.md: Document addition of Bodt(ID|Type) and the caveats about use 2023-01-11 19:43:24 +00:00
Athanasius 86b0aa4550 monitor: Track all System and Body state in monitor.state
* Minor grammar edit only in PLUGINS.md (I was checking if it explicitly
  stated what data is expected in the synthetic 'StartUp' event, it doesn't).
* First changes to move some monitor properties into the monitor.state
  dictionary.  This is for system or body data.
* Re-factored the generation of 'StartUp' event into
  `EDLogs.synthesize_startup_event()`.  It's done in two places, so was
  anti-DRY.
* In general any bulk setting of system & body data is now done in the
  same order for comparison clarity.
* A little of the location tracking has been duplicated from plugins/eddn.py.
  This is with a view to switching *it* to using the state version.
2023-01-11 19:43:14 +00:00
Athanasius 991f69044c PLUGINS.md: Avoid an example implying plugins can set main status text
The 'Error messages' section lays out how to get a message into the main
UI status area, and it does *not* say to try setting it directly.
2022-12-31 17:20:30 +00:00
aussig 16055a311f Typo in plugins docs 2022-12-26 11:23:44 +00:00
aussig f6f122072b Tweaks to plugins docs for fleetcarrier CAPI, including headings, typos and clarity on legacy galaxy 2022-12-26 11:20:37 +00:00
aussig e22fa7c23b Store cmdr name at request time in CAPIData instead of passing into EDMCCAPIRequest and EDMCCAPIResponse 2022-12-24 09:32:45 +00:00
aussig 3c8eca16af Revert unnoticed whitespace modifications to PLUGINS.py 2022-12-23 13:01:47 +00:00
aussig 7e726e606a Store original request cmdr name in 'request_cmdr' in CAPIData 2022-12-23 12:47:35 +00:00
aussig 9e17c46b25 Implement suggestions from PR #1773. 2022-12-22 16:21:42 +00:00
aussig a551da59a3 Documentation for capi_fleetcarrier() plugin callback function 2022-12-22 08:57:50 +00:00
Athanasius ba68397b3f CAPI killswitches: endpoint killswitches & eddn export ones too
* Added `capi.request.<endpoint>` killswitches at appropriate call points.
* Added `eddn.capi_export.<type>` killswitches.  This allows for killing
  just the EDDN export of such CAPI-derived data, without stopping the actual
  queries, as other plugins/functionality might still have harmless use of
  the data.
* PLUGINS.md: Actually describe the contents of `data` passed to plugins, and
  point out it might not always contain market or shipyard data.  This is
  not only because of the new killswitches, but could already have happened
  if the station/port docked at didn't have the services.
* Some misc typing cleanups.
2022-12-16 15:06:01 +00:00
Athanasius e2f4f8f665 PLUGINS.md: Slightly improve CAPI Legacy/Live doc 2022-12-14 13:51:29 +00:00
Athanasius 605ad07aac Merge pull request #1747 from EDCD/enhancement/1728/capi-for-legacy
CAPI: Enable use of Legacy host when applicable.
2022-12-14 10:42:05 +00:00
Athanasius 84615db839 PLUGINS.md: Allow use of CAPIData.source_host
* Additional Allowed Imports `from companion ...`.

* Plugin authors will still need to chain `cmdr_data_legacy()` to calling
  `cmdr_data()`, but with sanctioned access to `data.source_host` they can
  then determine the galaxy data source.

* Re-worked the documentation for CAPI data a little to make all of this as
  clear as possible.
2022-12-08 13:17:13 +00:00
Athanasius af5d998464 PLUGINS.md: Correct the statement about python stdlib 2022-12-08 12:59:36 +00:00
Athanasius a3a52055d3 CAPI/PLUGINS.md: Document cmdr_data_legacy()
For now warn against trying to use extra CAPIData properties to determine
the galaxy.
2022-12-08 12:53:31 +00:00
Athanasius 3e15aa0fe6 PLUGINS.md: More fully document state['NavRoute'
This includes the "catching up" load of the data.
2022-12-06 15:42:59 +00:00
Athanasius b4c4e44cb7 eddn/CAPI: Use a common function for game_version strings
* This did, however, remind me that the `data` passed into `cmdr_data()`
  is an amalgam of `/profile`, `/market` and `/shipyard` queries.

  This means that the data.source_endpoint is **not correct for all of
  the data and its use**.  As such I had to pass 'hard coded' values into
  the function from the various CAPI export functions.  They know what it
  is they're exporting.

* As this reminded me that "CAPI `data` is actually a `CAPIDATA`", I've
  documented that in PLUGINS.md, but with a dire warning against relying on
  any of the extra properties.
2022-12-01 16:42:06 +00:00
Athanasius b06e579754 PLUGINS.md: Emphasise limited use of from config import config 2022-12-01 12:14:49 +00:00
Athanasius 0eb33e011b PLUGINS.md: Document new IsDocked state flag. 2022-11-23 15:57:25 +00:00
Athanasius fa834daaca PLUGINS.md: Fix example return type hint for journal_entry()
It's `Optional[str]` for possible error string being returned.
2022-08-15 08:39:34 +01:00
Athanasius 1bb0bf9f74 PLUGINS.md: Document NavRouteClear behaviour 2022-08-10 11:47:51 +01:00
Athanasius 7116964dba PLUGINS: Call out keeping an eye on Discussions 2022-02-17 12:19:36 +00:00
Athanasius 785f9a3235 PLUGINS.md: We don't currently include all of Python stdlib 2021-11-16 11:07:32 +00:00
Athanasius 945baf7f53 Merge branch 'stable' 2021-10-25 11:12:39 +01:00
Athanasius cf5806021e PLUGINS.md: capi_is_horizons() now 2021-10-18 12:33:11 +01:00
Chris 5e5169da51 Fix shutting_down example in plugins.md 2021-08-25 15:03:19 -04:00
Chris 705d2dd4f1 Fix game_runnning() doc in PLUGINS.md 2021-08-24 14:52:10 -04:00
Athanasius f977ad6716 PLUGINS.md: General PyCharm alerts pass
A few bits of example code tweaked to be more correct, but to make
PyCharm truly happy about the file we'd need to expand the examples to
stupid proportions (extra imports, indent changes etc).
2021-08-13 13:50:46 +01:00
Athanasius 6c34ceaba9 PLUGINS.md: s/EDMC/EDMarketConnector/ almost everywhere & reflow
The reflow is on *all* non-code/table text to be within 80 columns,
excepting if a link just makes that impossible.
2021-08-13 13:32:36 +01:00
Athanasius 411bd0edf2 journal/CQC: Minor documentation tweaks for language/grammar 2021-08-13 13:19:46 +01:00
norohind c65ef0a4d6 PLUGINS.md: deduplicate content table for state in journal_entry_cqc 2021-08-13 14:41:35 +03:00
norohind 29df3869cd PLUGINS.md: update first EDMC version with journal_entry_cqc 2021-08-13 14:15:46 +03:00
norohind 28f7a2b2fe PLUGINS.md: add ref link for systems to CQC maps mapping 2021-08-13 14:07:50 +03:00
norohind 30048ded88 PLUGINS.md: initial update for journal_entry_cqc 2021-08-11 17:47:06 +03:00
A_D 2e5e55af9a Applied requested changes 2021-06-20 17:44:29 +02:00
A_D f609545fdc Updated plugin docs 2021-06-18 23:36:45 +02: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
Athanasius 937aaccec4 ShipLockerJSON: Ensure initialised, and document it. 2021-06-10 14:20:27 +01:00
Athanasius 13119b9509 Release 5.1.0: *not* 5.0.5. We want the Minor bump. 2021-06-04 14:02:59 +01:00
Athanasius 7a7bd7036b PLUGINS: Added 'New in 5.0.5' section 2021-06-04 13:41:03 +01:00
A_D 0ecd33c013 Documented new monitor.state values 2021-06-04 13:47:29 +02:00
Athanasius b11486c64c PLUGINS.md: Document new language/gameversion/gamebuild state fields. 2021-05-27 13:57:28 +01:00
Athanasius f46618b61c Suits: Added German localisations/short forms for names. 2021-05-26 14:49:17 +01:00
Athanasius bac718aeff Store Fileheader language, gameversion and build in monitor.state 2021-05-25 17:56:11 +01:00
Athanasius 143a205fb9 Backpack: event name is CamelCase, stored in monitor.state, doc
* Surprise!  The new event is `BackPack`, not `Backpack`, although the
  filename *is* `Backpack.json`.
* Store the loaded JSON dict in `monitor.state['BackpackJSON']`.  That
  `p` is lower case to match with the filename, not the event name.
* Document this in PLUGINS.md.

Unless EDSM is telling us to discard this we should now be sending it.
2021-05-20 18:13:51 +01:00