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

Individual locks for settings #283

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

LordMidas
Copy link
Member

@LordMidas LordMidas commented Feb 1, 2023

  • Allows individual locks to be placed on settings which can be removed on a per-lock basis.
  • Major advantage: this allows settings, during their on-changed callbacks, to add/remove locks on other settings.
  • A setting is only considered unlocked once all the locks have been removed.
  • While the lock function is deprecated, backwards compatible support for it is maintained via a legacy lock id.
  • The Locked state is removed from a setting's serialization, because locks should be set via requireSettingValue and/or addLock. Serializing the locked state leads to unintended behavior when mods are added/removed.

Request: We need to add functionality, so that after "Saving" and/or "Applying" the settings - we run the requiredSettingValues check (just like we do on campaign load - see #278). And if any setting couldn't be changed to a value required by the on-change callbacks or now has a value that violates required setting values, we should throw a popup/notification to notify the user.

Because all locks should be set anew during mods queue or campaign load as per the requirements of the currently used mods.
@LordMidas LordMidas added this to the 1.2.0-rc.3 milestone Feb 1, 2023
@LordMidas LordMidas requested review from TaroEld and Enduriel February 1, 2023 01:16
@LordMidas LordMidas force-pushed the individual-locks-for-settings branch from 5174c43 to cd0f5a7 Compare February 1, 2023 01:21
@LordMidas LordMidas force-pushed the individual-locks-for-settings branch from cd0f5a7 to a501c0c Compare February 1, 2023 01:26
@LordMidas LordMidas removed this from the 1.2.0-rc.3 milestone Feb 6, 2023
@LordMidas LordMidas added the postponed Something to work on eventually, but not now label Feb 6, 2023
@LordMidas LordMidas changed the base branch from release to development February 28, 2023 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postponed Something to work on eventually, but not now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant