Repository navigation
SEP: match parts by their loaded names (SEP.PSE) and keep SWS out of atmospheres - #79
Merged
Merged
Conversation
SEP_SWS.cfg has excludeAtmosphere = True like SEP_CCIG.cfg; it was missed in KSP-RO#78.
KSP replaces '_' with '.' in AvailablePart.name, and the science rules compare the configured part name as a raw string, so none of the SEP part mappings from KSP-RO#78 ever matched and AvailableExperiments() never returned a SEP experiment. Use the dotted names in the config and accept either spelling in Science.AvailableExperiments().
siimav
reviewed
Sep 28, 2026
AvailablePart.name never contains '_' (craft and save files use it to separate the flight ID, so KSP swaps it for '.' on load), which made the raw pname comparison dead code. Same normalization as ConfigNodeUtil.ParsePartValue; configs written with '_' still match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #78, which I found broken once I started writing contracts against it.
Part names never matched. KSP replaces
_with.when it loads a part (SEP_PSEbecomesAvailablePart.name == "SEP.PSE"), and the science rules compare the configuredpart =as a raw string. None of the SEP mappings from #78 ever matched, soAvailableExperiments()never returned a SEP experiment. The config now uses the dotted names, andScience.AvailableExperiments()accepts either spelling, so configs written with_keep working.Solar Wind Spectrometer.
SEP_SWS.cfghasexcludeAtmosphere = True, likeSEP_CCIG.cfg. I missed it in #78;SEP_SWS_*now gets the same no-atmosphere rule asSEP_CCIDscan_*.Verified on KSP 1.12.5 with CC 2.13.4 and SEP 2.7.1:
AvailableExperiments(Kerbin)now lists the SEP experiments the tech tree has unlocked, and a contract pack using them (tier 0 and tier 1) completes in game with no[ContractConfigurator]errors in the log.