Skip to content

Commit 19a161a

Browse files
committed
Use LunaStyle modifiers.
1 parent 7f5f123 commit 19a161a

3 files changed

Lines changed: 28 additions & 19 deletions

File tree

Penumbra/Config/Configuration.cs

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,30 @@ public bool EnableMods
123123
[JsonProperty(Order = int.MaxValue)]
124124
public ISortMode SortMode = ISortMode.FoldersFirst;
125125

126-
public bool OpenFoldersByDefault { get; set; } = false;
127-
public int SingleGroupRadioMax { get; set; } = 2;
128-
public string DefaultImportFolder { get; set; } = string.Empty;
129-
public string QuickMoveFolder1 { get; set; } = string.Empty;
130-
public string QuickMoveFolder2 { get; set; } = string.Empty;
131-
public string QuickMoveFolder3 { get; set; } = string.Empty;
132-
public DoubleModifier DeleteModModifier { get; set; } = new(ModifierHotkey.Control, ModifierHotkey.Shift);
133-
public DoubleModifier IncognitoModifier { get; set; } = new(ModifierHotkey.Control);
134-
public bool PrintSuccessfulCommandsToChat { get; set; } = true;
135-
public bool AutoDeduplicateOnImport { get; set; } = true;
136-
public bool AutoReduplicateUiOnImport { get; set; } = true;
137-
public bool UseFileSystemCompression { get; set; } = true;
138-
public bool EnableHttpApi { get; set; } = true;
126+
public bool OpenFoldersByDefault { get; set; } = false;
127+
public int SingleGroupRadioMax { get; set; } = 2;
128+
public string DefaultImportFolder { get; set; } = string.Empty;
129+
public string QuickMoveFolder1 { get; set; } = string.Empty;
130+
public string QuickMoveFolder2 { get; set; } = string.Empty;
131+
public string QuickMoveFolder3 { get; set; } = string.Empty;
132+
133+
public DoubleModifier DeleteModModifier
134+
{
135+
get => LunaStyle.Modifier.Destructive.Modifier;
136+
set => LunaStyle.Modifier.Destructive.Set(value);
137+
}
138+
139+
public DoubleModifier IncognitoModifier
140+
{
141+
get => LunaStyle.Modifier.Misclick.Modifier;
142+
set => LunaStyle.Modifier.Misclick.Set(value);
143+
}
144+
145+
public bool PrintSuccessfulCommandsToChat { get; set; } = true;
146+
public bool AutoDeduplicateOnImport { get; set; } = true;
147+
public bool AutoReduplicateUiOnImport { get; set; } = true;
148+
public bool UseFileSystemCompression { get; set; } = true;
149+
public bool EnableHttpApi { get; set; } = true;
139150

140151
public bool MigrateImportedModelsToV6 { get; set; } = true;
141152
public bool MigrateImportedMaterialsToLegacy { get; set; } = true;

Penumbra/UI/AdvancedWindow/ModEditWindow.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,6 @@ private void DrawDuplicatesTab()
371371
_editor.Duplicates.Clear();
372372
}
373373

374-
var modifier = _config.DeleteModModifier.IsActive();
375-
376374
if (_editor.ModNormalizer.Running)
377375
{
378376
Im.ProgressBar((float)_editor.ModNormalizer.Step / _editor.ModNormalizer.TotalSteps,
@@ -383,14 +381,14 @@ private void DrawDuplicatesTab()
383381
"Tries to create a unique copy of a file for every game path manipulated and put them in [Groupname]/[Optionname]/[GamePath] order.\n"u8
384382
+ "This will also delete all unused files and directories if it succeeds.\n"u8
385383
+ "Care was taken that a failure should not destroy the mod but revert to its original state, but you use this at your own risk anyway."u8,
386-
!_allowReduplicate && !modifier))
384+
!_allowReduplicate && !LunaStyle.Modifier.Destructive))
387385
{
388386
_editor.ModNormalizer.Normalize(Mod!);
389387
_editor.ModNormalizer.Worker.ContinueWith(_ => _editor.LoadMod(Mod!, _editor.GroupIdx, _editor.DataIdx), TaskScheduler.Default);
390388
}
391389

392-
if (_allowReduplicate && !modifier)
393-
Im.Tooltip.OnHover($"\n\nNo duplicates detected! Hold {_config.DeleteModModifier} to force normalization anyway.");
390+
if (_allowReduplicate && !LunaStyle.Modifier.Destructive)
391+
Im.Tooltip.OnHover($"\n\nNo duplicates detected! Hold {LunaStyle.Modifier.Destructive} to force normalization anyway.");
394392

395393
if (!_editor.Duplicates.Worker.IsCompleted)
396394
return;

0 commit comments

Comments
 (0)