Make ManualWithLinks the default.

This commit is contained in:
Ottermandias 2024-02-12 19:56:55 +01:00
parent b4cd5110f2
commit 488bea0e78
6 changed files with 17 additions and 7 deletions

View file

@ -163,7 +163,7 @@ public partial class GlamourerIpc
if ((hasModelId || state.ModelData.ModelId == 0) && state.CanUnlock(lockCode)) if ((hasModelId || state.ModelData.ModelId == 0) && state.CanUnlock(lockCode))
{ {
_stateManager.ApplyDesign(state, design, _stateManager.ApplyDesign(state, design,
new ApplySettings(Source: once ? StateSource.IpcManual : StateSource.IpcFixed, Key: lockCode)); new ApplySettings(Source: once ? StateSource.IpcManual : StateSource.IpcFixed, Key: lockCode, MergeLinks: true));
state.Lock(lockCode); state.Lock(lockCode);
} }
} }

View file

@ -24,6 +24,16 @@ public readonly record struct ApplySettings(
MergeLinks = false, MergeLinks = false,
}; };
public static readonly ApplySettings ManualWithLinks = new()
{
Key = 0,
Source = StateSource.Manual,
FromJobChange = false,
RespectManual = false,
UseSingleSource = false,
MergeLinks = true,
};
public static readonly ApplySettings Game = new() public static readonly ApplySettings Game = new()
{ {
Key = 0, Key = 0,

View file

@ -163,7 +163,7 @@ public sealed class DesignQuickBar : Window, IDisposable
var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags();
using var _ = design!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); using var _ = design!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters);
_stateManager.ApplyDesign(state, design, ApplySettings.Manual); _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks);
} }
public void DrawRevertButton(Vector2 buttonSize) public void DrawRevertButton(Vector2 buttonSize)

View file

@ -344,7 +344,7 @@ public class ActorPanel(
var text = ImGui.GetClipboardText(); var text = ImGui.GetClipboardText();
var design = _converter.FromBase64(text, applyCustomize, applyGear, out _) var design = _converter.FromBase64(text, applyCustomize, applyGear, out _)
?? throw new Exception("The clipboard did not contain valid data."); ?? throw new Exception("The clipboard did not contain valid data.");
_stateManager.ApplyDesign(_state!, design, ApplySettings.Manual with { MergeLinks = true }); _stateManager.ApplyDesign(_state!, design, ApplySettings.ManualWithLinks);
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -458,7 +458,7 @@ public class DesignPanel(
{ {
var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags();
using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters);
_state.ApplyDesign(state, _selector.Selected!, ApplySettings.Manual with { MergeLinks = true }); _state.ApplyDesign(state, _selector.Selected!, ApplySettings.ManualWithLinks);
} }
} }
@ -477,7 +477,7 @@ public class DesignPanel(
{ {
var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags(); var (applyGear, applyCustomize, applyCrest, applyParameters) = UiHelpers.ConvertKeysToFlags();
using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters); using var _ = _selector.Selected!.TemporarilyRestrictApplication(applyGear, applyCustomize, applyCrest, applyParameters);
_state.ApplyDesign(state, _selector.Selected!, ApplySettings.Manual with {MergeLinks = true}); _state.ApplyDesign(state, _selector.Selected!, ApplySettings.ManualWithLinks);
} }
} }

View file

@ -417,7 +417,7 @@ public class CommandService : IDisposable
if (!_objects.TryGetValue(identifier, out var actors)) if (!_objects.TryGetValue(identifier, out var actors))
{ {
if (_stateManager.TryGetValue(identifier, out var state)) if (_stateManager.TryGetValue(identifier, out var state))
_stateManager.ApplyDesign(state, design, ApplySettings.Manual with { MergeLinks = true }); _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks);
} }
else else
{ {
@ -426,7 +426,7 @@ public class CommandService : IDisposable
if (_stateManager.GetOrCreate(actor.GetIdentifier(_actors), actor, out var state)) if (_stateManager.GetOrCreate(actor.GetIdentifier(_actors), actor, out var state))
{ {
ApplyModSettings(design, actor, applyMods); ApplyModSettings(design, actor, applyMods);
_stateManager.ApplyDesign(state, design, ApplySettings.Manual with { MergeLinks = true }); _stateManager.ApplyDesign(state, design, ApplySettings.ManualWithLinks);
} }
} }
} }