-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Queue module version changes in change set #2821
Queue module version changes in change set #2821
Conversation
Needs a rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me.
As far as my German goes, it looks good.
Yes, German is fine! |
e43a43b
to
f1fb60e
Compare
Rebase completed. |
Would this be the place to request a config option somewhere to disable the extra dialog window? Potentially somewhere hard to find, so as to not invalidate the whole point of adding a scary dialog window in the first place. I'm all for decreasing nuisance reports to modders, they are at least 90% responsible for the loss of pjf. I'm also all for decreasing user RSI though, and adding extra clicks for operations (especially repetitive ones) is not the best way to achieve that. |
Can you share some of your planned change sets that include enough incompatible modules to induce repetitive stress injuries? |
Certainly. I'll do so around Tuesday I expect, as I'm away from the computer until then. |
Background
Originally, each row in the GUI mod list only allowed the user to install one version of the corresponding module: the most recent version compatible with the user's game version. Installing incompatible modules was completely impossible. Change sets could only handle installing the latest compatible version, because
ModChange
holds a reference toGUIMod
, which represents all versions of a module rather than a particular version.Later, #2364 added a double click option to compatible versions in the mod info version list to install older versions. To get around the version limitations of change sets, it prompted the user for confirmation and then jumped to the progress screen of the installation flow, skipping the change set confirmation and other early steps. In keeping with the previous total impossibility of installing incompatible modules, double clicking incompatible modules had no effect.
Motivation
Some users have expressed a preference for queuing module version changes along with normal installation/removal, so they can all be applied together. This makes sense (but is challenging to do).
In addition, the limitation to compatible versions is not particularly popular. Users would prefer to be allowed to install incompatible versions.
Changes
The double click installation is removed. See below for what replaces it.
ModChange
now holds a reference to aCkanModule
instead of aGUIMod
, so you can queue up a specific version of a module in the change set rather than just the identifier abstractly or the latest compatible. Updating the calling code for this was trivial, and in most cases an improvement as aGUIMod
object was being faked up unnecessarily.GUIMod
is no longer implicitly convertible toCkanModule
, because there are multiple possible choices and you should think about which one you're using.GUIMod
now has a publicSelectedMod
property that tracks which version the user wants to install and helps to drive the change set logic. This must be stored somewhere outside the UI so we can display the right selection if you switch to another row and back.GUIMod.GetRequestedChange
is replaced byGUIMod.GetRequestedChanges
, which can return multiple values to handle situations when we want to remove and install versions of the same mod. Conveniently this also simplifies howComputeUserChangeSet
collates the changes from multiple rows; instead of checking.HasValue
and then selecting.Value
, we simply use.SelectMany
to join all the lists, which are allowed to be empty.The Versions list now has checkboxes that represent the value of
GUIMod.SelectedMod
(and the column is 25px wider to compensate, not shown in old screenshot below):These can be checked and unchecked to choose versions to install, and those choices will appear in the change set. Switching from an older version to the latest version triggers the existing functionality for Upgrading (and vice versa).
If you try to choose an incompatible module, a very scary confirmation warning appears:
German translation:
If you click Install, it will allow you to install whatever:
Hopefully nobody will complain to mod authors if they break their install with this.
And hopefully users will still report inaccurate metadata rather than bypassing it and forgetting about it.
The change set can now show removal of one version of a module and installation of another version, for example:
Fixes #2714. Fixes #2715. Fixes #2822.
Companion fixes
InstallModuleDriver
now clearsChangeSet
instead ofchangeSet
at the end, see GUI uses nearly the same name for four different change set variables #2276 (comment).