Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process dump settings issues #500

Closed
gotmachine opened this issue Aug 23, 2019 · 0 comments
Closed

Process dump settings issues #500

gotmachine opened this issue Aug 23, 2019 · 0 comments
Assignees
Labels
bug Something isn't working code code related enhancement New feature or request

Comments

@gotmachine
Copy link
Collaborator

gotmachine commented Aug 23, 2019

When the user has customized process dump settings, they can be being internally reset to their default value or a different value when loading a vessel and on other events, despite the PAW showing the customized value. Practical workaround is to manually cycle the dump settings in the PAW.

The processes dump specs implementation is flawed from the very beginning, as processes are vessel-wide and dump specs are implemented per part, leading to individual parts fighting over what the vessel-level dump settings should be. I wont go in details about the billions of other issues this thing has, it's another thing that we need to rewrite from scratch.

I did a quick prototype for a reimplementation, but I haven't the time to do that right now so I'm posting this here for reference :

  • Implement an EditorVesselData persisted data structure, that we save in persistent.sfs and use to carry data from the editor to VesselData on vessel launch.
    Identify it by ShipConstruct.persistentId. From a quick analysis this is fail-proof as long as we don't use it in flight. Details :
    • Stock set this in the editor and save it in the ShipConstruct.persistentId
    • When the vessel is rolled out for launch, the value is copied to Vessel.persistentId in ShipConstruction.AssembleForLaunch()
    • This method is called just before the OnVesselRollout event, so we should be able to safely copy the VesselEditorData to the active vessel VesselData to carry our in-editor-defined vessel-level data to VesselData (might need to be in a coroutine to wait for the vessel to be properly initialized)
  • In the processes config definition, get ride of dump_valve and dump fields, add a defaultDumpedOutputs field instead. This accept a list of comma separated outputs or the all value. If the field is absent, no output are dumped by default.
  • Remove the processControler module dump_specs config value and all related code.
  • In the editor, add a "configure processes" button to the planner. This open a popup with the list of all processes present on the vessel. For each process, list the resource used, their rate, and a "dump" checkbox for the outputs. Save these settings in the VesselEditorData as a dictionary<string,string[]> where the string is the process name and string[] an array of the dumped outputs names. If that data is not initialized yet, get the default values from defaultDumpedOutputs.
  • Same popup is available in flight trough a "configure processes" buttons in the monitor UI.
  • It's then trivial to get the dump status of an output from Process.ExecuteRecipe()

Related issues : #422, #337, #449, #497, #494

@gotmachine gotmachine added bug Something isn't working enhancement New feature or request code code related labels Aug 23, 2019
@gotmachine gotmachine self-assigned this Aug 23, 2019
@gotmachine gotmachine added this to Wishlist in 4.0 Sep 8, 2019
@SirMortimer SirMortimer moved this from Wishlist to In progress in 4.0 Mar 9, 2020
@SirMortimer SirMortimer moved this from In progress to In testing in 4.0 Mar 9, 2020
@gotmachine gotmachine added this to the 4.0 milestone Apr 22, 2021
@gotmachine gotmachine removed this from In testing in 4.0 Jul 29, 2021
@gotmachine gotmachine removed this from the 4.0 milestone Jan 16, 2022
@gotmachine gotmachine changed the title Process UI + Dump specs refactor Process dump settings issues Jan 16, 2022
@gotmachine gotmachine pinned this issue Jul 24, 2022
@gotmachine gotmachine unpinned this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code code related enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant