gui/mod-manager: warn when a preset is missing new vanilla mods - #1628
Open
Alistair-Afton wants to merge 1 commit into
Open
Alistair-Afton wants to merge 1 commit into
Alistair-Afton wants to merge 1 commit into
Conversation
When Bay12 adds a new vanilla mod, existing presets silently exclude it since the preset modlist predates it. Presets now record the set of installed vanilla mod ids when saved or overwritten. On load, the current vanilla set is compared against the recorded set and a warning lists any new vanilla mods the preset does not include. The recorded set is refreshed on every load so the warning fires only once per new mod. Presets saved before this change record the current set silently on their first load, since intentionally excluded vanilla mods cannot be distinguished from missing ones. Fixes DFHack/dfhack#5839
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.
Fixes DFHack/dfhack#5839
Summary
When Bay12 ships a new vanilla mod, existing mod presets silently exclude it since their modlist predates it.
Presets now record the set of installed vanilla mod ids (
vanilla_mods) when saved or overwritten. On load, the current vanilla set frombase_availableis compared against the recorded set and any new vanilla mod not in the preset's modlist is listed in the warning dialog. The recorded set is refreshed on every load so the warning fires only once per new mod, and the newly recorded ids include intentionally excluded mods, which prevents repeat false positives.Presets saved before this change have no recorded set and record the current one silently on first load — intentionally excluded vanilla mods cannot be distinguished from missing ones at that point, and a false warning on every old preset seemed worse.
Testing
Verified live against a synthetic
viewscreen_new_regionstwith populatedbase_availablevectors (three vanilla mods + one local mod), a shadowedget_any_moddable_viewscreen, and a test preset whose recorded baseline lacked one vanilla mod:object_load_orderas before.get_vanilla_mod_idsreturns onlydata/vanillaentries.