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

Modpack compatibility prompt, GameComparator clean-up #4056

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Mar 11, 2024

Motivations

If you try to install a modpack from a .ckan file, you may have (potentially much) narrower compatibility settings than the modpack creator, which can prevent some dependencies from being found and make the installation fail.

In #3675, we added a prompt to notify users when this might happen:

image

However, this doesn't really present a clear, reliable path forward for the user; if they click Cancel, the installation aborts, and if they click Install, the installation will continue but might fail. What we really need is a way to guide users to extend their compatibility settings so the install can both continue and succeed.

Changes

Now before that prompt appears, a better one shows up:

image

If the user clicks "Add compatible versions", then we auto-update their compatibility settings to be a superset of the modpack's compatibility (which is based on the modpack .ckan file's ksp_version_min and ksp_version_max settings, which are based on the compatibility settings of the modpack creator), which should guarantee a successful install. If they instead click "Keep current compatibility", then we leave their settings alone, and they will still get warned about any specific incompatibilities.

Other changes

While developing this, I noticed some problems with the IGameComparator family of classes:

  • GrasGameComparator treats version 1.0.4 as implicitly compatible with 1.0.3, which is KSP1-specific logic that should not be applied to other games. It's very unlikely that anyone is relying on this behavior, and if they are, the compatible versions setting is a better approach anyway.
  • YoyoGameComparator isn't used for anything

These classes and the files containing them are now deleted, and we now only use StrictGameComparator to check module compatibility.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI labels Mar 11, 2024
@HebaruSan HebaruSan merged commit eaee4fd into KSP-CKAN:master Mar 11, 2024
8 checks passed
@HebaruSan HebaruSan deleted the feature/modpack-compat-prompt branch March 11, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant