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

Compatibility request: Kerbalism science #727

Open
trijemusk opened this issue Dec 3, 2023 · 1 comment
Open

Compatibility request: Kerbalism science #727

trijemusk opened this issue Dec 3, 2023 · 1 comment

Comments

@trijemusk
Copy link

Bug:
I tried to use some science contract packs (Field Research and RAD) in combination with Kerbalism, and found out that they do not work together: the contracts never show up, and every contract type fails the requirement: "must have a valid experiment to perform".
I believe that this problem is caused by the fact that Kerbalism replaces all science experiments with their own version, which causes Contract Configurator to not find any experiment that can be performed.

Solution idea:
Looking into the source code it seems like all science related expressions boil down to the Science.getSubjects() method which is referenced multiple times in ExpressionParser/Parsers/Classes/Science. I propose to add a check whether Kerbalism (and its FeatureScience) is installed, and if so to instead use the method GetSubjectData() (located in the namespace KERBALISM, class ScienceDB, with this source code file) which seems to do the exact same things but instead with Kerbalism's science.

@trijemusk
Copy link
Author

Small addendum: we should not remove the call to Science.getSubjects() since that would remove compatibility with other mods that still use stock science. Instead, we should just append the data from Kerbalism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant