Fix module priorities not to get lost#3354
Merged
vadi2 merged 2 commits intoMudlet:developmentfrom Feb 27, 2020
Merged
Conversation
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
Member
Author
|
@PhoenixCodes test this out! |
vadi2
commented
Feb 21, 2020
| } | ||
| Host& host = getHostFromLua(L); | ||
| if (host.mModulePriorities.contains(moduleName)) { | ||
| if (host.mInstalledModules.contains(moduleName)) { |
Member
Author
There was a problem hiding this comment.
This is the actually important bit of the PR.
|
Tested and modules load correctly with their priorities intact. |
Member
Author
|
Can you test setting module priorities during the module install event as well? |
demonnic
approved these changes
Feb 27, 2020
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.
Brief overview of PR changes/additions
Fix module priorities not to get lost on saving, while still keeping
setModulePriority()working if called during the module installation event.Motivation for adding to Mudlet
Bugfix.
Other info (issues closed, discussion etc)
Fixes #3345.
I took a different approach to solving it this time - since it seems a few things down the pipeline rely on the presence of a module as a flag for something. Instead of adding every module at priority 0, the
setModulePriority()function will instead set the value as needed.