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

Make X skip buttons in changelog work better for modpacks #4143

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

HebaruSan
Copy link
Member

Problem

If you install a modpack from a .ckan file, the X icons from #4033 are available, but clicking them and confirming the popup simply closes the changeset rather than removing the selected change.

Originally reported by Discord user Tollwütige Banane after trying out the dev build for its modpack fixes.

Cause

When you click the X and confirm, it raises an event that triggers ManageMods.RemoveChangesetItem, which only works properly if you selected the changeset via the checkboxes in Manage Mods. The changeset for a modpack comes from elsewhere, so ManageMods was instead doing nothing and then refreshing the changeset tab with an empty changeset, which causes it to close.

Changes

  • Now ManageMods.RemoveChangesetItem only refreshes the changeset if it actually removes the change you clicked from its own changeset; it will do nothing if it originated in a modpack.
  • Now the changeset tab removes the selected change from its own changeset, so the user can continue using the changeset and/or move on to installation of the reduced changeset.
    • For changesets from the Manage Mods tab, this quick simple change will then be overwritten by a new complete changeset that handles removal of depending mods, removal of auto-installed mods, conflicts, etc.
    • For modpacks, no such additional logic will be performed. Note that this means that the removed mod might might be pulled back in as a dependency during installation! Or installation might fail due to a conflict. These additional checks would be nice to have in the future, but for now, the basic functionality will work in most cases.

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI labels Aug 5, 2024
@HebaruSan HebaruSan merged commit 5b5911e into KSP-CKAN:master Aug 5, 2024
3 checks passed
@HebaruSan HebaruSan deleted the fix/modpack-changeset-rm branch August 5, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant