Stage modules with hardcoded game versions #2970
Merged
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.
Motivation
Currently we have 29 netkans with
x_netkan_staging
enabled because the KSP version compatibility info is hard coded in the netkan, and hence might be out of date anytime a new version is released. This has been a bit tedious to set manually for each such netkan, and it is pretty much the same thing every time, hence it would be nice to automate.Changes
Now a new
StagingTransformer
does this automatically. It runs first so it can see the raw netkan data without interference by other transformers, and if it findsksp_version
,ksp_version_min
, orksp_version_max
, it enables staging and sets the reason to a string explaining what keys were found, their values, and how to proceed. This way, any netkan with hard coded compatibility info will automatically be staged every time, and we can remove the staging properties from the netkans that have it.