Skip to content

Adding to the coriolis 'core' plugin, the ability to add an API key f…#2643

Open
alex-williams wants to merge 4 commits into
EDCD:developfrom
Brighter-Applications:cmdr-coriolis
Open

Adding to the coriolis 'core' plugin, the ability to add an API key f…#2643
alex-williams wants to merge 4 commits into
EDCD:developfrom
Brighter-Applications:cmdr-coriolis

Conversation

@alex-williams
Copy link
Copy Markdown

Description

Adding the ability to add an API key for cmdr.coriolis.io and when added, the ability to send material, ship and module data to cmdr.coriolis.io with the users consent.

Example Images

image

Type of Change

Enhancement to Existing Feature

How Tested

Run from source with the modifications in place, then played the game with it running, to ensure that data is sent back to cmdr.coriolis.io.

alex-williams and others added 4 commits April 11, 2026 13:56
…or cmdr.coriolis.io and when added, the ability to send material, ship and module data to cmdr.coriolis.io with the users consent.
After EDMC restarts and replays the journal during catch-up,
state['Modules'] is populated from any Loadout entries in the
journal. However, plugins never see these historical events —
only the synthesized StartUp event is forwarded.

This means plugins that depend on receiving a Loadout event
(e.g. Inara's shipswap handler, Coriolis CMDR) miss the
current ship loadout after an EDMC restart.

Fix: after synthesizing the StartUp event, also synthesize a
Loadout event via self.ship() if state['Modules'] is populated.
This gives every plugin the current ship loadout on startup
without requiring any plugin-side changes.
Add cmdr_data() hook and _build_loadout_from_capi() to the coriolis
plugin. This sends the current ship loadout to the Coriolis CMDR API
whenever EDMC fetches fresh data from Frontier's CAPI (on docking and
manual sync button press).

This is the primary mechanism for detecting ship changes after a
ShipyardSwap, because the Loadout journal event may not be forwarded
to plugins by EDMC after a catch-up replay.

Also:
- Remove unused json import
- Extract _handle_ship_event and _handle_module_event helpers to
  reduce journal_entry complexity below flake8 threshold (C901)
- Add datetime import for CAPI timestamp generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants