From 22f90e23aac7203f9a6a7b9349a163cd68fbc5f7 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 8 Feb 2022 13:30:10 +0000 Subject: [PATCH 1/2] Inara: Trigger off 'Progress' for sending setCommanderRankPilot Doing so from 'Rank' means the 'Progress' event hadn't happened yet, so of course we only ever sent all zeroes for progress. NB: Journal-v32 doc makes *no guarantee* about the order of the events. Is it worth trying to be paranoid about that ? For a 100% new player everything would be "all zeroes", so we would likely need to tweak things to store `None` as default values, and check for such. --- plugins/inara.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inara.py b/plugins/inara.py index 2446693a..e0e0dade 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -519,7 +519,7 @@ def journal_entry( # noqa: C901, CCR001 new_add_event('setCommanderShipLoadout', entry['timestamp'], this.loadout) # Login-time Ranks - elif event_name == 'Rank': + elif event_name == 'Progress': # Send rank info to Inara on startup new_add_event( 'setCommanderRankPilot', From 30e9abb870658f7821e9d7c671cad4f00f033dec Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 8 Feb 2022 13:34:03 +0000 Subject: [PATCH 2/2] Inara: Change the comment for why we're using Progress, not Ranks --- plugins/inara.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/inara.py b/plugins/inara.py index e0e0dade..9388d5da 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -518,7 +518,8 @@ def journal_entry( # noqa: C901, CCR001 this.loadout = make_loadout(state) new_add_event('setCommanderShipLoadout', entry['timestamp'], this.loadout) - # Login-time Ranks + # Trigger off the "only observed as being after Ranks" event so that + # we have both current Ranks *and* current Progress within them. elif event_name == 'Progress': # Send rank info to Inara on startup new_add_event(