mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
Remove PalettePlusChecker and config options to disable Advanced Customization and Advanced Dyes.
This commit is contained in:
parent
425c9471fb
commit
528aae7eee
14 changed files with 66 additions and 172 deletions
|
|
@ -314,7 +314,7 @@ public sealed class StateApi : IGlamourerApiState, IApiService, IDisposable
|
||||||
if (!state.CanUnlock(key))
|
if (!state.CanUnlock(key))
|
||||||
return (GlamourerApiEc.InvalidKey, null);
|
return (GlamourerApiEc.InvalidKey, null);
|
||||||
|
|
||||||
return (GlamourerApiEc.Success, _converter.ShareJObject(state, ApplicationRules.AllWithConfig(_config)));
|
return (GlamourerApiEc.Success, _converter.ShareJObject(state, ApplicationRules.All));
|
||||||
}
|
}
|
||||||
|
|
||||||
private (GlamourerApiEc, string?) ConvertBase64(ActorState? state, uint key)
|
private (GlamourerApiEc, string?) ConvertBase64(ActorState? state, uint key)
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,6 @@ public class Configuration : IPluginConfiguration, ISavable
|
||||||
public bool ShowQuickBarInTabs { get; set; } = true;
|
public bool ShowQuickBarInTabs { get; set; } = true;
|
||||||
public bool OpenWindowAtStart { get; set; } = false;
|
public bool OpenWindowAtStart { get; set; } = false;
|
||||||
public bool ShowWindowWhenUiHidden { get; set; } = false;
|
public bool ShowWindowWhenUiHidden { get; set; } = false;
|
||||||
public bool UseAdvancedParameters { get; set; } = true;
|
|
||||||
public bool UseAdvancedDyes { get; set; } = true;
|
|
||||||
public bool KeepAdvancedDyesAttached { get; set; } = true;
|
public bool KeepAdvancedDyesAttached { get; set; } = true;
|
||||||
public bool ShowPalettePlusImport { get; set; } = true;
|
public bool ShowPalettePlusImport { get; set; } = true;
|
||||||
public bool UseFloatForColors { get; set; } = true;
|
public bool UseFloatForColors { get; set; } = true;
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,6 @@ public readonly struct ApplicationRules(ApplicationCollection application, bool
|
||||||
public static ApplicationRules AllButParameters(ActorState state)
|
public static ApplicationRules AllButParameters(ActorState state)
|
||||||
=> new(ApplicationCollection.All with { Parameters = ComputeParameters(state.ModelData, state.BaseData, All.Parameters) }, true);
|
=> new(ApplicationCollection.All with { Parameters = ComputeParameters(state.ModelData, state.BaseData, All.Parameters) }, true);
|
||||||
|
|
||||||
public static ApplicationRules AllWithConfig(Configuration config)
|
|
||||||
=> new(ApplicationCollection.All with { Parameters = config.UseAdvancedParameters ? All.Parameters : 0 }, config.UseAdvancedDyes);
|
|
||||||
|
|
||||||
public static ApplicationRules NpcFromModifiers(bool ctrl, bool shift)
|
public static ApplicationRules NpcFromModifiers(bool ctrl, bool shift)
|
||||||
{
|
{
|
||||||
var equip = ctrl || !shift ? EquipFlagExtensions.All : 0;
|
var equip = ctrl || !shift ? EquipFlagExtensions.All : 0;
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,6 @@ public class Glamourer : IDalamudPlugin
|
||||||
sb.Append($"> **`Auto-Reload Gear: `** {config.AutoRedrawEquipOnChanges}\n");
|
sb.Append($"> **`Auto-Reload Gear: `** {config.AutoRedrawEquipOnChanges}\n");
|
||||||
sb.Append($"> **`Revert on Zone Change:`** {config.RevertManualChangesOnZoneChange}\n");
|
sb.Append($"> **`Revert on Zone Change:`** {config.RevertManualChangesOnZoneChange}\n");
|
||||||
sb.Append($"> **`Festival Easter-Eggs: `** {config.DisableFestivals}\n");
|
sb.Append($"> **`Festival Easter-Eggs: `** {config.DisableFestivals}\n");
|
||||||
sb.Append($"> **`Advanced Customize: `** {config.UseAdvancedParameters}\n");
|
|
||||||
sb.Append($"> **`Advanced Dye: `** {config.UseAdvancedDyes}\n");
|
|
||||||
sb.Append($"> **`Apply Entire Weapon: `** {config.ChangeEntireItem}\n");
|
sb.Append($"> **`Apply Entire Weapon: `** {config.ChangeEntireItem}\n");
|
||||||
sb.Append($"> **`Apply Associated Mods:`** {config.AlwaysApplyAssociatedMods}\n");
|
sb.Append($"> **`Apply Associated Mods:`** {config.AlwaysApplyAssociatedMods}\n");
|
||||||
sb.Append($"> **`Show QDB: `** {config.Ephemeral.ShowDesignQuickBar}\n");
|
sb.Append($"> **`Show QDB: `** {config.Ephemeral.ShowDesignQuickBar}\n");
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ using Glamourer.Interop.Penumbra;
|
||||||
using Glamourer.Interop.Structs;
|
using Glamourer.Interop.Structs;
|
||||||
using Glamourer.State;
|
using Glamourer.State;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using OtterGui;
|
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Text;
|
using OtterGui.Text;
|
||||||
using Penumbra.GameData.Actors;
|
using Penumbra.GameData.Actors;
|
||||||
|
|
@ -304,9 +303,6 @@ public sealed class DesignQuickBar : Window, IDisposable
|
||||||
|
|
||||||
private void DrawRevertAdvancedCustomization(Vector2 buttonSize)
|
private void DrawRevertAdvancedCustomization(Vector2 buttonSize)
|
||||||
{
|
{
|
||||||
if (!_config.UseAdvancedParameters)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!_config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
if (!_config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -475,7 +471,7 @@ public sealed class DesignQuickBar : Window, IDisposable
|
||||||
++_numButtons;
|
++_numButtons;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((_config.UseAdvancedParameters || _config.UseAdvancedDyes) && _config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
if (_config.QdbButtons.HasFlag(QdbButtons.RevertAdvanced))
|
||||||
++_numButtons;
|
++_numButtons;
|
||||||
if (_config.QdbButtons.HasFlag(QdbButtons.RevertCustomize))
|
if (_config.QdbButtons.HasFlag(QdbButtons.RevertCustomize))
|
||||||
++_numButtons;
|
++_numButtons;
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@ public sealed unsafe class AdvancedDyePopup(
|
||||||
|
|
||||||
private bool ShouldBeDrawn()
|
private bool ShouldBeDrawn()
|
||||||
{
|
{
|
||||||
if (!config.UseAdvancedDyes)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (_drawIndex is not { Valid: true })
|
if (_drawIndex is not { Valid: true })
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -58,9 +55,6 @@ public sealed unsafe class AdvancedDyePopup(
|
||||||
|
|
||||||
private void DrawButton(MaterialValueIndex index, uint color)
|
private void DrawButton(MaterialValueIndex index, uint color)
|
||||||
{
|
{
|
||||||
if (!config.UseAdvancedDyes)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
using var id = ImUtf8.PushId(index.SlotIndex | ((int)index.DrawObject << 8));
|
using var id = ImUtf8.PushId(index.SlotIndex | ((int)index.DrawObject << 8));
|
||||||
var isOpen = index == _drawIndex;
|
var isOpen = index == _drawIndex;
|
||||||
|
|
|
||||||
|
|
@ -239,9 +239,6 @@ public class ActorPanel
|
||||||
|
|
||||||
private void DrawParameterHeader()
|
private void DrawParameterHeader()
|
||||||
{
|
{
|
||||||
if (!_config.UseAdvancedParameters)
|
|
||||||
return;
|
|
||||||
|
|
||||||
using var h = ImUtf8.CollapsingHeaderId("Advanced Customizations"u8);
|
using var h = ImUtf8.CollapsingHeaderId("Advanced Customizations"u8);
|
||||||
if (!h)
|
if (!h)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -180,10 +180,7 @@ public class DesignPanel
|
||||||
|
|
||||||
private void DrawCustomizeParameters()
|
private void DrawCustomizeParameters()
|
||||||
{
|
{
|
||||||
if (!_config.UseAdvancedParameters)
|
using var h = ImUtf8.CollapsingHeaderId("Advanced Customizations"u8);
|
||||||
return;
|
|
||||||
|
|
||||||
using var h = ImRaii.CollapsingHeader("Advanced Customizations");
|
|
||||||
if (!h)
|
if (!h)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -192,10 +189,7 @@ public class DesignPanel
|
||||||
|
|
||||||
private void DrawMaterialValues()
|
private void DrawMaterialValues()
|
||||||
{
|
{
|
||||||
if (!_config.UseAdvancedDyes)
|
using var h = ImUtf8.CollapsingHeaderId("Advanced Dyes"u8);
|
||||||
return;
|
|
||||||
|
|
||||||
using var h = ImRaii.CollapsingHeader("Advanced Dyes");
|
|
||||||
if (!h)
|
if (!h)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -204,7 +198,7 @@ public class DesignPanel
|
||||||
|
|
||||||
private void DrawCustomizeApplication()
|
private void DrawCustomizeApplication()
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Customizations");
|
using var id = ImUtf8.PushId("Customizations"u8);
|
||||||
var set = _selector.Selected!.CustomizeSet;
|
var set = _selector.Selected!.CustomizeSet;
|
||||||
var available = set.SettingAvailable | CustomizeFlag.Clan | CustomizeFlag.Gender | CustomizeFlag.BodyType;
|
var available = set.SettingAvailable | CustomizeFlag.Clan | CustomizeFlag.Gender | CustomizeFlag.BodyType;
|
||||||
var flags = _selector.Selected!.ApplyCustomizeExcludingBodyType == 0 ? 0 :
|
var flags = _selector.Selected!.ApplyCustomizeExcludingBodyType == 0 ? 0 :
|
||||||
|
|
@ -219,55 +213,52 @@ public class DesignPanel
|
||||||
}
|
}
|
||||||
|
|
||||||
var applyClan = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Clan);
|
var applyClan = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Clan);
|
||||||
if (ImGui.Checkbox($"Apply {CustomizeIndex.Clan.ToDefaultName()}", ref applyClan))
|
if (ImUtf8.Checkbox($"Apply {CustomizeIndex.Clan.ToDefaultName()}", ref applyClan))
|
||||||
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Clan, applyClan);
|
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Clan, applyClan);
|
||||||
|
|
||||||
var applyGender = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Gender);
|
var applyGender = _selector.Selected!.DoApplyCustomize(CustomizeIndex.Gender);
|
||||||
if (ImGui.Checkbox($"Apply {CustomizeIndex.Gender.ToDefaultName()}", ref applyGender))
|
if (ImUtf8.Checkbox($"Apply {CustomizeIndex.Gender.ToDefaultName()}", ref applyGender))
|
||||||
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Gender, applyGender);
|
_manager.ChangeApplyCustomize(_selector.Selected!, CustomizeIndex.Gender, applyGender);
|
||||||
|
|
||||||
|
|
||||||
foreach (var index in CustomizationExtensions.All.Where(set.IsAvailable))
|
foreach (var index in CustomizationExtensions.All.Where(set.IsAvailable))
|
||||||
{
|
{
|
||||||
var apply = _selector.Selected!.DoApplyCustomize(index);
|
var apply = _selector.Selected!.DoApplyCustomize(index);
|
||||||
if (ImGui.Checkbox($"Apply {set.Option(index)}", ref apply))
|
if (ImUtf8.Checkbox($"Apply {set.Option(index)}", ref apply))
|
||||||
_manager.ChangeApplyCustomize(_selector.Selected!, index, apply);
|
_manager.ChangeApplyCustomize(_selector.Selected!, index, apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawCrestApplication()
|
private void DrawCrestApplication()
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Crests");
|
using var id = ImUtf8.PushId("Crests"u8);
|
||||||
var flags = (uint)_selector.Selected!.Application.Crest;
|
var flags = (uint)_selector.Selected!.Application.Crest;
|
||||||
var bigChange = ImGui.CheckboxFlags("Apply All Crests", ref flags, (uint)CrestExtensions.AllRelevant);
|
var bigChange = ImGui.CheckboxFlags("Apply All Crests", ref flags, (uint)CrestExtensions.AllRelevant);
|
||||||
foreach (var flag in CrestExtensions.AllRelevantSet)
|
foreach (var flag in CrestExtensions.AllRelevantSet)
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((CrestFlag)flags & flag) == flag : _selector.Selected!.DoApplyCrest(flag);
|
var apply = bigChange ? ((CrestFlag)flags & flag) == flag : _selector.Selected!.DoApplyCrest(flag);
|
||||||
if (ImGui.Checkbox($"Apply {flag.ToLabel()} Crest", ref apply) || bigChange)
|
if (ImUtf8.Checkbox($"Apply {flag.ToLabel()} Crest", ref apply) || bigChange)
|
||||||
_manager.ChangeApplyCrest(_selector.Selected!, flag, apply);
|
_manager.ChangeApplyCrest(_selector.Selected!, flag, apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawApplicationRules()
|
private void DrawApplicationRules()
|
||||||
{
|
{
|
||||||
using var h = ImRaii.CollapsingHeader("Application Rules");
|
using var h = ImUtf8.CollapsingHeaderId("Application Rules"u8);
|
||||||
if (!h)
|
if (!h)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
using var disabled = ImRaii.Disabled(_selector.Selected!.WriteProtected());
|
using var disabled = ImRaii.Disabled(_selector.Selected!.WriteProtected());
|
||||||
|
|
||||||
using (var _ = ImRaii.Group())
|
using (var _ = ImUtf8.Group())
|
||||||
{
|
{
|
||||||
DrawCustomizeApplication();
|
DrawCustomizeApplication();
|
||||||
ImUtf8.IconDummy();
|
ImUtf8.IconDummy();
|
||||||
DrawCrestApplication();
|
DrawCrestApplication();
|
||||||
ImUtf8.IconDummy();
|
ImUtf8.IconDummy();
|
||||||
if (_config.UseAdvancedParameters)
|
DrawMetaApplication();
|
||||||
{
|
ImUtf8.IconDummy();
|
||||||
DrawMetaApplication();
|
DrawBonusSlotApplication();
|
||||||
ImUtf8.IconDummy();
|
|
||||||
DrawBonusSlotApplication();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SameLine(ImGui.GetContentRegionAvail().X / 2);
|
ImGui.SameLine(ImGui.GetContentRegionAvail().X / 2);
|
||||||
|
|
@ -276,20 +267,20 @@ public class DesignPanel
|
||||||
void ApplyEquip(string label, EquipFlag allFlags, bool stain, IEnumerable<EquipSlot> slots)
|
void ApplyEquip(string label, EquipFlag allFlags, bool stain, IEnumerable<EquipSlot> slots)
|
||||||
{
|
{
|
||||||
var flags = (uint)(allFlags & _selector.Selected!.Application.Equip);
|
var flags = (uint)(allFlags & _selector.Selected!.Application.Equip);
|
||||||
using var id = ImRaii.PushId(label);
|
using var id = ImUtf8.PushId(label);
|
||||||
var bigChange = ImGui.CheckboxFlags($"Apply All {label}", ref flags, (uint)allFlags);
|
var bigChange = ImGui.CheckboxFlags($"Apply All {label}", ref flags, (uint)allFlags);
|
||||||
if (stain)
|
if (stain)
|
||||||
foreach (var slot in slots)
|
foreach (var slot in slots)
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToStainFlag()) : _selector.Selected!.DoApplyStain(slot);
|
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToStainFlag()) : _selector.Selected!.DoApplyStain(slot);
|
||||||
if (ImGui.Checkbox($"Apply {slot.ToName()} Dye", ref apply) || bigChange)
|
if (ImUtf8.Checkbox($"Apply {slot.ToName()} Dye", ref apply) || bigChange)
|
||||||
_manager.ChangeApplyStains(_selector.Selected!, slot, apply);
|
_manager.ChangeApplyStains(_selector.Selected!, slot, apply);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
foreach (var slot in slots)
|
foreach (var slot in slots)
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToFlag()) : _selector.Selected!.DoApplyEquip(slot);
|
var apply = bigChange ? ((EquipFlag)flags).HasFlag(slot.ToFlag()) : _selector.Selected!.DoApplyEquip(slot);
|
||||||
if (ImGui.Checkbox($"Apply {slot.ToName()}", ref apply) || bigChange)
|
if (ImUtf8.Checkbox($"Apply {slot.ToName()}", ref apply) || bigChange)
|
||||||
_manager.ChangeApplyItem(_selector.Selected!, slot, apply);
|
_manager.ChangeApplyItem(_selector.Selected!, slot, apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -311,16 +302,7 @@ public class DesignPanel
|
||||||
EquipSlotExtensions.FullSlots);
|
EquipSlotExtensions.FullSlots);
|
||||||
|
|
||||||
ImUtf8.IconDummy();
|
ImUtf8.IconDummy();
|
||||||
if (_config.UseAdvancedParameters)
|
DrawParameterApplication();
|
||||||
{
|
|
||||||
DrawParameterApplication();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DrawMetaApplication();
|
|
||||||
ImUtf8.IconDummy();
|
|
||||||
DrawBonusSlotApplication();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -334,7 +316,7 @@ public class DesignPanel
|
||||||
|
|
||||||
private void DrawMetaApplication()
|
private void DrawMetaApplication()
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Meta");
|
using var id = ImUtf8.PushId("Meta");
|
||||||
const uint all = (uint)MetaExtensions.All;
|
const uint all = (uint)MetaExtensions.All;
|
||||||
var flags = (uint)_selector.Selected!.Application.Meta;
|
var flags = (uint)_selector.Selected!.Application.Meta;
|
||||||
var bigChange = ImGui.CheckboxFlags("Apply All Meta Changes", ref flags, all);
|
var bigChange = ImGui.CheckboxFlags("Apply All Meta Changes", ref flags, all);
|
||||||
|
|
@ -342,7 +324,7 @@ public class DesignPanel
|
||||||
foreach (var (index, label) in MetaExtensions.AllRelevant.Zip(MetaLabels))
|
foreach (var (index, label) in MetaExtensions.AllRelevant.Zip(MetaLabels))
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((MetaFlag)flags).HasFlag(index.ToFlag()) : _selector.Selected!.DoApplyMeta(index);
|
var apply = bigChange ? ((MetaFlag)flags).HasFlag(index.ToFlag()) : _selector.Selected!.DoApplyMeta(index);
|
||||||
if (ImGui.Checkbox(label, ref apply) || bigChange)
|
if (ImUtf8.Checkbox(label, ref apply) || bigChange)
|
||||||
_manager.ChangeApplyMeta(_selector.Selected!, index, apply);
|
_manager.ChangeApplyMeta(_selector.Selected!, index, apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -368,20 +350,20 @@ public class DesignPanel
|
||||||
|
|
||||||
private void DrawParameterApplication()
|
private void DrawParameterApplication()
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Parameter");
|
using var id = ImUtf8.PushId("Parameter");
|
||||||
var flags = (uint)_selector.Selected!.Application.Parameters;
|
var flags = (uint)_selector.Selected!.Application.Parameters;
|
||||||
var bigChange = ImGui.CheckboxFlags("Apply All Customize Parameters", ref flags, (uint)CustomizeParameterExtensions.All);
|
var bigChange = ImGui.CheckboxFlags("Apply All Customize Parameters", ref flags, (uint)CustomizeParameterExtensions.All);
|
||||||
foreach (var flag in CustomizeParameterExtensions.AllFlags)
|
foreach (var flag in CustomizeParameterExtensions.AllFlags)
|
||||||
{
|
{
|
||||||
var apply = bigChange ? ((CustomizeParameterFlag)flags).HasFlag(flag) : _selector.Selected!.DoApplyParameter(flag);
|
var apply = bigChange ? ((CustomizeParameterFlag)flags).HasFlag(flag) : _selector.Selected!.DoApplyParameter(flag);
|
||||||
if (ImGui.Checkbox($"Apply {flag.ToName()}", ref apply) || bigChange)
|
if (ImUtf8.Checkbox($"Apply {flag.ToName()}", ref apply) || bigChange)
|
||||||
_manager.ChangeApplyParameter(_selector.Selected!, flag, apply);
|
_manager.ChangeApplyParameter(_selector.Selected!, flag, apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw()
|
||||||
{
|
{
|
||||||
using var group = ImRaii.Group();
|
using var group = ImUtf8.Group();
|
||||||
if (_selector.SelectedPaths.Count > 1)
|
if (_selector.SelectedPaths.Count > 1)
|
||||||
{
|
{
|
||||||
_multiDesignPanel.Draw();
|
_multiDesignPanel.Draw();
|
||||||
|
|
@ -419,10 +401,12 @@ public class DesignPanel
|
||||||
using var table = ImUtf8.Table("##Panel", 1, ImGuiTableFlags.BordersOuter | ImGuiTableFlags.ScrollY, ImGui.GetContentRegionAvail());
|
using var table = ImUtf8.Table("##Panel", 1, ImGuiTableFlags.BordersOuter | ImGuiTableFlags.ScrollY, ImGui.GetContentRegionAvail());
|
||||||
if (!table || _selector.Selected == null)
|
if (!table || _selector.Selected == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ImGui.TableSetupScrollFreeze(0, 1);
|
ImGui.TableSetupScrollFreeze(0, 1);
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
if (_selector.Selected == null)
|
if (_selector.Selected == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ImGui.Dummy(Vector2.Zero);
|
ImGui.Dummy(Vector2.Zero);
|
||||||
DrawButtonRow();
|
DrawButtonRow();
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ public class SettingsTab(
|
||||||
IKeyState keys,
|
IKeyState keys,
|
||||||
DesignColorUi designColorUi,
|
DesignColorUi designColorUi,
|
||||||
PaletteImport paletteImport,
|
PaletteImport paletteImport,
|
||||||
PalettePlusChecker paletteChecker,
|
|
||||||
CollectionOverrideDrawer overrides,
|
CollectionOverrideDrawer overrides,
|
||||||
CodeDrawer codeDrawer,
|
CodeDrawer codeDrawer,
|
||||||
Glamourer glamourer,
|
Glamourer glamourer,
|
||||||
|
|
@ -93,20 +92,15 @@ public class SettingsTab(
|
||||||
Checkbox("Revert Manual Changes on Zone Change"u8,
|
Checkbox("Revert Manual Changes on Zone Change"u8,
|
||||||
"Restores the old behaviour of reverting your character to its game or automation base whenever you change the zone."u8,
|
"Restores the old behaviour of reverting your character to its game or automation base whenever you change the zone."u8,
|
||||||
config.RevertManualChangesOnZoneChange, v => config.RevertManualChangesOnZoneChange = v);
|
config.RevertManualChangesOnZoneChange, v => config.RevertManualChangesOnZoneChange = v);
|
||||||
Checkbox("Enable Advanced Customization Options"u8,
|
|
||||||
"Enable the display and editing of advanced customization options like arbitrary colors."u8,
|
|
||||||
config.UseAdvancedParameters, paletteChecker.SetAdvancedParameters);
|
|
||||||
PaletteImportButton();
|
PaletteImportButton();
|
||||||
Checkbox("Enable Advanced Dye Options"u8,
|
|
||||||
"Enable the display and editing of advanced dyes (color sets) for all equipment"u8,
|
|
||||||
config.UseAdvancedDyes, v => config.UseAdvancedDyes = v);
|
|
||||||
Checkbox("Always Apply Associated Mods"u8,
|
Checkbox("Always Apply Associated Mods"u8,
|
||||||
"Whenever a design is applied to a character (including via automation), Glamourer will try to apply its associated mod settings to the collection currently associated with that character, if it is available.\n\n"u8
|
"Whenever a design is applied to a character (including via automation), Glamourer will try to apply its associated mod settings to the collection currently associated with that character, if it is available.\n\n"u8
|
||||||
+ "Glamourer will NOT revert these applied settings automatically. This may mess up your collection and configuration.\n\n"u8
|
+ "Glamourer will NOT revert these applied settings automatically. This may mess up your collection and configuration.\n\n"u8
|
||||||
+ "If you enable this setting, you are aware that any resulting misconfiguration is your own fault."u8,
|
+ "If you enable this setting, you are aware that any resulting misconfiguration is your own fault."u8,
|
||||||
config.AlwaysApplyAssociatedMods, v => config.AlwaysApplyAssociatedMods = v);
|
config.AlwaysApplyAssociatedMods, v => config.AlwaysApplyAssociatedMods = v);
|
||||||
Checkbox("Use Temporary Mod Settings"u8,
|
Checkbox("Use Temporary Mod Settings"u8,
|
||||||
"Apply all settings as temporary settings so they will be reset when Glamourer or the game shut down."u8, config.UseTemporarySettings,
|
"Apply all settings as temporary settings so they will be reset when Glamourer or the game shut down."u8,
|
||||||
|
config.UseTemporarySettings,
|
||||||
v => config.UseTemporarySettings = v);
|
v => config.UseTemporarySettings = v);
|
||||||
ImGui.NewLine();
|
ImGui.NewLine();
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +146,7 @@ public class SettingsTab(
|
||||||
ImGui.Dummy(Vector2.Zero);
|
ImGui.Dummy(Vector2.Zero);
|
||||||
|
|
||||||
Checkbox("Enable Game Context Menus"u8, "Whether to show a Try On via Glamourer button on context menus for equippable items."u8,
|
Checkbox("Enable Game Context Menus"u8, "Whether to show a Try On via Glamourer button on context menus for equippable items."u8,
|
||||||
config.EnableGameContextMenu, v =>
|
config.EnableGameContextMenu, v =>
|
||||||
{
|
{
|
||||||
config.EnableGameContextMenu = v;
|
config.EnableGameContextMenu = v;
|
||||||
if (v)
|
if (v)
|
||||||
|
|
@ -161,12 +155,13 @@ public class SettingsTab(
|
||||||
contextMenuService.Disable();
|
contextMenuService.Disable();
|
||||||
});
|
});
|
||||||
Checkbox("Show Window when UI is Hidden"u8, "Whether to show Glamourer windows even when the games UI is hidden."u8,
|
Checkbox("Show Window when UI is Hidden"u8, "Whether to show Glamourer windows even when the games UI is hidden."u8,
|
||||||
config.ShowWindowWhenUiHidden, v =>
|
config.ShowWindowWhenUiHidden, v =>
|
||||||
{
|
{
|
||||||
config.ShowWindowWhenUiHidden = v;
|
config.ShowWindowWhenUiHidden = v;
|
||||||
uiBuilder.DisableUserUiHide = v;
|
uiBuilder.DisableUserUiHide = v;
|
||||||
});
|
});
|
||||||
Checkbox("Hide Window in Cutscenes"u8, "Whether the main Glamourer window should automatically be hidden when entering cutscenes or not."u8,
|
Checkbox("Hide Window in Cutscenes"u8,
|
||||||
|
"Whether the main Glamourer window should automatically be hidden when entering cutscenes or not."u8,
|
||||||
config.HideWindowInCutscene,
|
config.HideWindowInCutscene,
|
||||||
v =>
|
v =>
|
||||||
{
|
{
|
||||||
|
|
@ -177,13 +172,13 @@ public class SettingsTab(
|
||||||
config.Ephemeral.LockMainWindow,
|
config.Ephemeral.LockMainWindow,
|
||||||
v => config.Ephemeral.LockMainWindow = v);
|
v => config.Ephemeral.LockMainWindow = v);
|
||||||
Checkbox("Open Main Window at Game Start"u8, "Whether the main Glamourer window should be open or closed after launching the game."u8,
|
Checkbox("Open Main Window at Game Start"u8, "Whether the main Glamourer window should be open or closed after launching the game."u8,
|
||||||
config.OpenWindowAtStart, v => config.OpenWindowAtStart = v);
|
config.OpenWindowAtStart, v => config.OpenWindowAtStart = v);
|
||||||
ImGui.Dummy(Vector2.Zero);
|
ImGui.Dummy(Vector2.Zero);
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
ImGui.Dummy(Vector2.Zero);
|
ImGui.Dummy(Vector2.Zero);
|
||||||
|
|
||||||
Checkbox("Smaller Equip Display"u8, "Use single-line display without icons and small dye buttons instead of double-line display."u8,
|
Checkbox("Smaller Equip Display"u8, "Use single-line display without icons and small dye buttons instead of double-line display."u8,
|
||||||
config.SmallEquip, v => config.SmallEquip = v);
|
config.SmallEquip, v => config.SmallEquip = v);
|
||||||
DrawHeightUnitSettings();
|
DrawHeightUnitSettings();
|
||||||
Checkbox("Show Application Checkboxes"u8,
|
Checkbox("Show Application Checkboxes"u8,
|
||||||
"Show the application checkboxes in the Customization and Equipment panels of the design tab, instead of only showing them under Application Rules."u8,
|
"Show the application checkboxes in the Customization and Equipment panels of the design tab, instead of only showing them under Application Rules."u8,
|
||||||
|
|
@ -211,23 +206,22 @@ public class SettingsTab(
|
||||||
Checkbox("Show Unobtained Item Warnings"u8,
|
Checkbox("Show Unobtained Item Warnings"u8,
|
||||||
"Show information whether you have unlocked all items and customizations in your automated design or not."u8,
|
"Show information whether you have unlocked all items and customizations in your automated design or not."u8,
|
||||||
config.ShowUnlockedItemWarnings, v => config.ShowUnlockedItemWarnings = v);
|
config.ShowUnlockedItemWarnings, v => config.ShowUnlockedItemWarnings = v);
|
||||||
if (config.UseAdvancedParameters)
|
Checkbox("Show Color Display Config"u8, "Show the Color Display configuration options in the Advanced Customization panels."u8,
|
||||||
|
config.ShowColorConfig, v => config.ShowColorConfig = v);
|
||||||
|
Checkbox("Show Palette+ Import Button"u8,
|
||||||
|
"Show the import button that allows you to import Palette+ palettes onto a design in the Advanced Customization options section for designs."u8,
|
||||||
|
config.ShowPalettePlusImport, v => config.ShowPalettePlusImport = v);
|
||||||
|
using (ImRaii.PushId(1))
|
||||||
{
|
{
|
||||||
Checkbox("Show Color Display Config"u8, "Show the Color Display configuration options in the Advanced Customization panels."u8,
|
|
||||||
config.ShowColorConfig, v => config.ShowColorConfig = v);
|
|
||||||
Checkbox("Show Palette+ Import Button"u8,
|
|
||||||
"Show the import button that allows you to import Palette+ palettes onto a design in the Advanced Customization options section for designs."u8,
|
|
||||||
config.ShowPalettePlusImport, v => config.ShowPalettePlusImport = v);
|
|
||||||
using var id = ImRaii.PushId(1);
|
|
||||||
PaletteImportButton();
|
PaletteImportButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.UseAdvancedDyes)
|
Checkbox("Keep Advanced Dye Window Attached"u8,
|
||||||
Checkbox("Keep Advanced Dye Window Attached"u8,
|
"Keeps the advanced dye window expansion attached to the main window, or makes it freely movable."u8,
|
||||||
"Keeps the advanced dye window expansion attached to the main window, or makes it freely movable."u8,
|
config.KeepAdvancedDyesAttached, v => config.KeepAdvancedDyesAttached = v);
|
||||||
config.KeepAdvancedDyesAttached, v => config.KeepAdvancedDyesAttached = v);
|
|
||||||
|
|
||||||
Checkbox("Debug Mode"u8, "Show the debug tab. Only useful for debugging or advanced use. Not recommended in general."u8, config.DebugMode,
|
Checkbox("Debug Mode"u8, "Show the debug tab. Only useful for debugging or advanced use. Not recommended in general."u8,
|
||||||
|
config.DebugMode,
|
||||||
v => config.DebugMode = v);
|
v => config.DebugMode = v);
|
||||||
ImGui.NewLine();
|
ImGui.NewLine();
|
||||||
}
|
}
|
||||||
|
|
@ -235,8 +229,7 @@ public class SettingsTab(
|
||||||
private void DrawQuickDesignBoxes()
|
private void DrawQuickDesignBoxes()
|
||||||
{
|
{
|
||||||
var showAuto = config.EnableAutoDesigns;
|
var showAuto = config.EnableAutoDesigns;
|
||||||
var showAdvanced = config.UseAdvancedParameters || config.UseAdvancedDyes;
|
var numColumns = 8 - (showAuto ? 0 : 2) - (config.UseTemporarySettings ? 0 : 1);
|
||||||
var numColumns = 8 - (showAuto ? 0 : 2) - (showAdvanced ? 0 : 1) - (config.UseTemporarySettings ? 0 : 1);
|
|
||||||
ImGui.NewLine();
|
ImGui.NewLine();
|
||||||
ImUtf8.Text("Show the Following Buttons in the Quick Design Bar:"u8);
|
ImUtf8.Text("Show the Following Buttons in the Quick Design Bar:"u8);
|
||||||
ImGui.Dummy(Vector2.Zero);
|
ImGui.Dummy(Vector2.Zero);
|
||||||
|
|
@ -253,11 +246,11 @@ public class SettingsTab(
|
||||||
("Reapply Auto", showAuto, QdbButtons.ReapplyAutomation),
|
("Reapply Auto", showAuto, QdbButtons.ReapplyAutomation),
|
||||||
("Revert Equip", true, QdbButtons.RevertEquip),
|
("Revert Equip", true, QdbButtons.RevertEquip),
|
||||||
("Revert Customize", true, QdbButtons.RevertCustomize),
|
("Revert Customize", true, QdbButtons.RevertCustomize),
|
||||||
("Revert Advanced", showAdvanced, QdbButtons.RevertAdvanced),
|
("Revert Advanced", true, QdbButtons.RevertAdvanced),
|
||||||
("Reset Settings", config.UseTemporarySettings, QdbButtons.ResetSettings),
|
("Reset Settings", config.UseTemporarySettings, QdbButtons.ResetSettings),
|
||||||
];
|
];
|
||||||
|
|
||||||
for(var i = 0; i < columns.Length; ++i)
|
for (var i = 0; i < columns.Length; ++i)
|
||||||
{
|
{
|
||||||
if (!columns[i].Item2)
|
if (!columns[i].Item2)
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -291,7 +284,7 @@ public class SettingsTab(
|
||||||
|
|
||||||
private void PaletteImportButton()
|
private void PaletteImportButton()
|
||||||
{
|
{
|
||||||
if (!config.UseAdvancedParameters || !config.ShowPalettePlusImport)
|
if (!config.ShowPalettePlusImport)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,6 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
|
||||||
|
|
||||||
private void OnPrepareColorSet(CharacterBase* characterBase, MaterialResourceHandle* material, ref StainIds stain, ref nint ret)
|
private void OnPrepareColorSet(CharacterBase* characterBase, MaterialResourceHandle* material, ref StainIds stain, ref nint ret)
|
||||||
{
|
{
|
||||||
if (!_config.UseAdvancedDyes)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var actor = _penumbra.GameObjectFromDrawObject(characterBase);
|
var actor = _penumbra.GameObjectFromDrawObject(characterBase);
|
||||||
var validType = FindType(characterBase, actor, out var type);
|
var validType = FindType(characterBase, actor, out var type);
|
||||||
var (slotId, materialId) = FindMaterial(characterBase, material);
|
var (slotId, materialId) = FindMaterial(characterBase, material);
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
using Dalamud.Interface.ImGuiNotification;
|
|
||||||
using Dalamud.Plugin;
|
|
||||||
using OtterGui.Services;
|
|
||||||
using Notification = OtterGui.Classes.Notification;
|
|
||||||
|
|
||||||
namespace Glamourer.Interop.PalettePlus;
|
|
||||||
|
|
||||||
public sealed class PalettePlusChecker : IRequiredService, IDisposable
|
|
||||||
{
|
|
||||||
private readonly Timer _paletteTimer;
|
|
||||||
private readonly Configuration _config;
|
|
||||||
private readonly IDalamudPluginInterface _pluginInterface;
|
|
||||||
|
|
||||||
public PalettePlusChecker(Configuration config, IDalamudPluginInterface pluginInterface)
|
|
||||||
{
|
|
||||||
_config = config;
|
|
||||||
_pluginInterface = pluginInterface;
|
|
||||||
_paletteTimer = new Timer(_ => PalettePlusCheck(), null, TimeSpan.FromSeconds(30), Timeout.InfiniteTimeSpan);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
=> _paletteTimer.Dispose();
|
|
||||||
|
|
||||||
public void SetAdvancedParameters(bool value)
|
|
||||||
{
|
|
||||||
_config.UseAdvancedParameters = value;
|
|
||||||
PalettePlusCheck();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PalettePlusCheck()
|
|
||||||
{
|
|
||||||
if (!_config.UseAdvancedParameters)
|
|
||||||
return;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var subscriber = _pluginInterface.GetIpcSubscriber<string>("PalettePlus.ApiVersion");
|
|
||||||
subscriber.InvokeFunc();
|
|
||||||
Glamourer.Messager.AddMessage(new Notification(
|
|
||||||
"You currently have Palette+ installed. This conflicts with Glamourers advanced options and will cause invalid state.\n\n"
|
|
||||||
+ "Please uninstall Palette+ and restart your game. Palette+ is deprecated and no longer supported by Mare Synchronos.",
|
|
||||||
NotificationType.Warning, 10000));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// ignored
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -25,7 +25,6 @@ public class StateApplier(
|
||||||
MetaService _metaService,
|
MetaService _metaService,
|
||||||
ObjectManager _objects,
|
ObjectManager _objects,
|
||||||
CrestService _crests,
|
CrestService _crests,
|
||||||
Configuration _config,
|
|
||||||
DirectXService _directX)
|
DirectXService _directX)
|
||||||
{
|
{
|
||||||
/// <summary> Simply force a redraw regardless of conditions. </summary>
|
/// <summary> Simply force a redraw regardless of conditions. </summary>
|
||||||
|
|
@ -291,30 +290,26 @@ public class StateApplier(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Change the customize parameters on models. Can change multiple at once. </summary>
|
/// <summary> Change the customize parameters on models. Can change multiple at once. </summary>
|
||||||
public void ChangeParameters(ActorData data, CustomizeParameterFlag flags, in CustomizeParameterData values, bool force)
|
public void ChangeParameters(ActorData data, CustomizeParameterFlag flags, in CustomizeParameterData values)
|
||||||
{
|
{
|
||||||
if (!force && !_config.UseAdvancedParameters || flags == 0)
|
if (flags == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var actor in data.Objects.Where(a => a is { IsCharacter: true, Model.IsHuman: true }))
|
foreach (var actor in data.Objects.Where(a => a is { IsCharacter: true, Model.IsHuman: true }))
|
||||||
actor.Model.ApplyParameterData(flags, values);
|
actor.Model.ApplyParameterData(flags, values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="ChangeParameters(ActorData,CustomizeParameterFlag,in CustomizeParameterData,bool)"/>
|
/// <inheritdoc cref="ChangeParameters(ActorData,CustomizeParameterFlag,in CustomizeParameterData)"/>
|
||||||
public ActorData ChangeParameters(ActorState state, CustomizeParameterFlag flags, bool apply)
|
public ActorData ChangeParameters(ActorState state, CustomizeParameterFlag flags, bool apply)
|
||||||
{
|
{
|
||||||
var data = GetData(state);
|
var data = GetData(state);
|
||||||
if (apply)
|
if (apply)
|
||||||
ChangeParameters(data, flags, state.ModelData.Parameters, state.IsLocked);
|
ChangeParameters(data, flags, state.ModelData.Parameters);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe void ChangeMaterialValue(ActorState state, ActorData data, MaterialValueIndex changedIndex, ColorRow? changedValue,
|
public unsafe void ChangeMaterialValue(ActorState state, ActorData data, MaterialValueIndex changedIndex, ColorRow? changedValue)
|
||||||
bool force)
|
|
||||||
{
|
{
|
||||||
if (!force && !_config.UseAdvancedDyes)
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach (var actor in data.Objects.Where(a => a is { IsCharacter: true, Model.IsHuman: true }))
|
foreach (var actor in data.Objects.Where(a => a is { IsCharacter: true, Model.IsHuman: true }))
|
||||||
{
|
{
|
||||||
if (!changedIndex.TryGetTexture(actor, out var texture))
|
if (!changedIndex.TryGetTexture(actor, out var texture))
|
||||||
|
|
@ -341,16 +336,13 @@ public class StateApplier(
|
||||||
{
|
{
|
||||||
var data = GetData(state);
|
var data = GetData(state);
|
||||||
if (apply)
|
if (apply)
|
||||||
ChangeMaterialValue(state, data, index, state.Materials.TryGetValue(index, out var v) ? v.Model : null, state.IsLocked);
|
ChangeMaterialValue(state, data, index, state.Materials.TryGetValue(index, out var v) ? v.Model : null);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public unsafe void ChangeMaterialValues(ActorData data, in StateMaterialManager materials, bool force)
|
public unsafe void ChangeMaterialValues(ActorData data, in StateMaterialManager materials)
|
||||||
{
|
{
|
||||||
if (!force && !_config.UseAdvancedDyes)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var groupedMaterialValues = materials.Values.Select(p => (MaterialValueIndex.FromKey(p.Key), p.Value))
|
var groupedMaterialValues = materials.Values.Select(p => (MaterialValueIndex.FromKey(p.Key), p.Value))
|
||||||
.GroupBy(p => (p.Item1.DrawObject, p.Item1.SlotIndex, p.Item1.MaterialIndex));
|
.GroupBy(p => (p.Item1.DrawObject, p.Item1.SlotIndex, p.Item1.MaterialIndex));
|
||||||
|
|
||||||
|
|
@ -410,8 +402,8 @@ public class StateApplier(
|
||||||
ChangeMetaState(actors, MetaIndex.WeaponState, state.ModelData.IsWeaponVisible());
|
ChangeMetaState(actors, MetaIndex.WeaponState, state.ModelData.IsWeaponVisible());
|
||||||
ChangeMetaState(actors, MetaIndex.VisorState, state.ModelData.IsVisorToggled());
|
ChangeMetaState(actors, MetaIndex.VisorState, state.ModelData.IsVisorToggled());
|
||||||
ChangeCrests(actors, state.ModelData.CrestVisibility);
|
ChangeCrests(actors, state.ModelData.CrestVisibility);
|
||||||
ChangeParameters(actors, state.OnlyChangedParameters(), state.ModelData.Parameters, state.IsLocked);
|
ChangeParameters(actors, state.OnlyChangedParameters(), state.ModelData.Parameters);
|
||||||
ChangeMaterialValues(actors, state.Materials, state.IsLocked);
|
ChangeMaterialValues(actors, state.Materials);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class StateListener : IDisposable
|
||||||
private readonly HeadGearVisibilityChanged _headGearVisibility;
|
private readonly HeadGearVisibilityChanged _headGearVisibility;
|
||||||
private readonly VisorStateChanged _visorState;
|
private readonly VisorStateChanged _visorState;
|
||||||
private readonly WeaponVisibilityChanged _weaponVisibility;
|
private readonly WeaponVisibilityChanged _weaponVisibility;
|
||||||
private readonly StateFinalized _stateFinalized;
|
private readonly StateFinalized _stateFinalized;
|
||||||
private readonly AutoDesignApplier _autoDesignApplier;
|
private readonly AutoDesignApplier _autoDesignApplier;
|
||||||
private readonly FunModule _funModule;
|
private readonly FunModule _funModule;
|
||||||
private readonly HumanModelList _humans;
|
private readonly HumanModelList _humans;
|
||||||
|
|
@ -88,7 +88,7 @@ public class StateListener : IDisposable
|
||||||
_condition = condition;
|
_condition = condition;
|
||||||
_crestService = crestService;
|
_crestService = crestService;
|
||||||
_bonusSlotUpdating = bonusSlotUpdating;
|
_bonusSlotUpdating = bonusSlotUpdating;
|
||||||
_stateFinalized = stateFinalized;
|
_stateFinalized = stateFinalized;
|
||||||
Subscribe();
|
Subscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -889,7 +889,7 @@ public class StateListener : IDisposable
|
||||||
case StateSource.Manual:
|
case StateSource.Manual:
|
||||||
if (state.BaseData.Parameters.Set(flag, newValue))
|
if (state.BaseData.Parameters.Set(flag, newValue))
|
||||||
_manager.ChangeCustomizeParameter(state, flag, newValue, ApplySettings.Game);
|
_manager.ChangeCustomizeParameter(state, flag, newValue, ApplySettings.Game);
|
||||||
else if (_config.UseAdvancedParameters)
|
else
|
||||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||||
break;
|
break;
|
||||||
case StateSource.IpcManual:
|
case StateSource.IpcManual:
|
||||||
|
|
@ -900,8 +900,7 @@ public class StateListener : IDisposable
|
||||||
break;
|
break;
|
||||||
case StateSource.Fixed:
|
case StateSource.Fixed:
|
||||||
state.BaseData.Parameters.Set(flag, newValue);
|
state.BaseData.Parameters.Set(flag, newValue);
|
||||||
if (_config.UseAdvancedParameters)
|
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
|
||||||
break;
|
break;
|
||||||
case StateSource.IpcFixed:
|
case StateSource.IpcFixed:
|
||||||
state.BaseData.Parameters.Set(flag, newValue);
|
state.BaseData.Parameters.Set(flag, newValue);
|
||||||
|
|
@ -910,14 +909,12 @@ public class StateListener : IDisposable
|
||||||
case StateSource.Pending:
|
case StateSource.Pending:
|
||||||
state.BaseData.Parameters.Set(flag, newValue);
|
state.BaseData.Parameters.Set(flag, newValue);
|
||||||
state.Sources[flag] = StateSource.Manual;
|
state.Sources[flag] = StateSource.Manual;
|
||||||
if (_config.UseAdvancedParameters)
|
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
|
||||||
break;
|
break;
|
||||||
case StateSource.IpcPending:
|
case StateSource.IpcPending:
|
||||||
state.BaseData.Parameters.Set(flag, newValue);
|
state.BaseData.Parameters.Set(flag, newValue);
|
||||||
state.Sources[flag] = StateSource.IpcManual;
|
state.Sources[flag] = StateSource.IpcManual;
|
||||||
if (_config.UseAdvancedParameters)
|
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ public sealed class StateManager(
|
||||||
{
|
{
|
||||||
actors = Applier.ChangeParameters(state, CustomizeParameterExtensions.All, true);
|
actors = Applier.ChangeParameters(state, CustomizeParameterExtensions.All, true);
|
||||||
foreach (var (idx, mat) in state.Materials.Values)
|
foreach (var (idx, mat) in state.Materials.Values)
|
||||||
Applier.ChangeMaterialValue(state, actors, MaterialValueIndex.FromKey(idx), mat.Game, true);
|
Applier.ChangeMaterialValue(state, actors, MaterialValueIndex.FromKey(idx), mat.Game);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.Materials.Clear();
|
state.Materials.Clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue