Include 'missing?' Loadout event properties in 'state' #2347
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the following stats which are present in the 'Loadout' event to the 'state' for journal_update:
Also updates the Plugins Readme to match the changes.
Type of Change
Enhancement to existing 'state' tracking feature.
How Tested
First submission so no serious regression testing, thanks in advance for the review.
Tested that any permanent changes to these properties should be accompanied by another 'Loadout' event, meaning adding them should never result in odd desyncs with the actual game state, please correct me if I'm wrong.
Compiled EDMC with changes and verified
state
properly contains the new values when I dump state:Notes
briefly discussed in EDCD Discord's edmc-plugins channel, couldn't find any open issues referencing this.
This PR may be completely unnecessary, but I couldn't find any other way of accessing these in a tracked state within EDMC, and they are very useful to have for a variety of funcitons, the cargo-manifest plugin is a good example of something that could be greatly simplified and future-proofed with this.
If these stats are otherwise accessible or should not be tracked in this manner for some reason please let me know and I'll update the plugins readme instead, as it currently claims:
And already tracks the majority of stats within Loadout, with this only the 'HullHealth' and 'Hot' values would inaccessible from state, and both are probably better sourced from other events, and are more prone to desync.
TIA for the response!