mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Allow non-locking, negative identifier-locks
This commit is contained in:
parent
5f9cbe9ab1
commit
cff482a2ed
5 changed files with 7 additions and 7 deletions
|
|
@ -29,7 +29,7 @@ public sealed class ModGroupDrawer(Configuration config, CollectionManager colle
|
|||
_blockGroupCache.Clear();
|
||||
_tempSettings = tempSettings;
|
||||
_temporary = tempSettings != null;
|
||||
_locked = (tempSettings?.Lock ?? 0) != 0;
|
||||
_locked = (tempSettings?.Lock ?? 0) > 0;
|
||||
var useDummy = true;
|
||||
foreach (var (group, idx) in mod.Groups.WithIndex())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ public sealed class ModFileSystemSelector : FileSystemSelector<Mod, ModFileSyste
|
|||
private void RemoveTemporarySettings(FileSystem<Mod>.Leaf mod)
|
||||
{
|
||||
var tempSettings = _collectionManager.Active.Current.GetTempSettings(mod.Value.Index);
|
||||
if (tempSettings is { Lock: 0 })
|
||||
if (tempSettings is { Lock: <= 0 })
|
||||
if (ImUtf8.MenuItem("Remove Temporary Settings"))
|
||||
_collectionManager.Editor.SetTemporarySettings(_collectionManager.Active.Current, mod.Value, null);
|
||||
}
|
||||
|
|
@ -277,7 +277,7 @@ public sealed class ModFileSystemSelector : FileSystemSelector<Mod, ModFileSyste
|
|||
private void DisableTemporarily(FileSystem<Mod>.Leaf mod)
|
||||
{
|
||||
var tempSettings = _collectionManager.Active.Current.GetTempSettings(mod.Value.Index);
|
||||
if (tempSettings == null || tempSettings.Lock == 0)
|
||||
if (tempSettings is not { Lock: > 0 })
|
||||
if (ImUtf8.MenuItem("Disable Temporarily"))
|
||||
_collectionManager.Editor.SetTemporarySettings(_collectionManager.Active.Current, mod.Value,
|
||||
TemporaryModSettings.DefaultSettings(mod.Value, "User Context-Menu"));
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class ModPanelSettingsTab(
|
|||
|
||||
_inherited = selection.Collection != collectionManager.Active.Current;
|
||||
_temporary = selection.TemporarySettings != null;
|
||||
_locked = (selection.TemporarySettings?.Lock ?? 0) != 0;
|
||||
_locked = (selection.TemporarySettings?.Lock ?? 0) > 0;
|
||||
DrawTemporaryWarning();
|
||||
DrawInheritedWarning();
|
||||
UiHelpers.DefaultLineSpace();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue