Skip to content

Recommendation suppression for modpacks#4147

Merged
HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/suppress-rec-modpacks
Aug 6, 2024
Merged

Recommendation suppression for modpacks#4147
HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/suppress-rec-modpacks

Conversation

@HebaruSan
Copy link
Copy Markdown
Member

Motivation

Currently, in order to install the exact list of mods in a modpack, the user has to deselect the recommendations of all the mods. It would be nice to be able to skip this step.

It looks like setting suppress_recommendations for each item in the depends list should work, but it doesn't because those items get added as first class members of the changeset, which causes that property to be ignored in the modpack.

A similar thing can happen in a normal changeset; if A and B are in the changeset, and both depend on C but only A has suppress_recommendations set, B's lack of the property will mean that C's recommendations are still shown. That probably frustrates the author of A, especially if they're from KSP-RO.

Changes

  • Now suppress_recommendations is obeyed if it is set for any depends relationship in the changeset, even if other mods have the same dependency without that property or if the dependency is in the changeset itself.
    • Since modpacks are included in changesets, this means that depends[].suppress_recommendations in a modpack will now work.
    • It also means that in the above A/B/C scenario, C's recommendations will no longer be shown, which the KSP-RO folks will probably like.
  • Now the export modpack screen in GUI has an "Include optional relationships" checkbox that sets suppress_recommendations for every relationship in depends if unchecked, to make it easy to generate such metadata.

Fixes #4145.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN Relationships Issues affecting depends, recommends, etc. labels Aug 6, 2024
@HebaruSan HebaruSan force-pushed the fix/suppress-rec-modpacks branch from e9990a5 to 11ef1dc Compare August 6, 2024 18:15
@HebaruSan HebaruSan force-pushed the fix/suppress-rec-modpacks branch from 11ef1dc to f8785f9 Compare August 6, 2024 19:23
@JonnyOThan
Copy link
Copy Markdown
Contributor

Seems to work!

@HebaruSan HebaruSan merged commit 81ec4c2 into KSP-CKAN:master Aug 6, 2024
@HebaruSan HebaruSan deleted the fix/suppress-rec-modpacks branch August 6, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI Relationships Issues affecting depends, recommends, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] .ckan files need a way to suppress recommendations (allows for accurate backups/replication)

2 participants