mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Fix reverter designs a bit.
This commit is contained in:
parent
0dc0a534cf
commit
55af7f7371
3 changed files with 8 additions and 12 deletions
|
|
@ -5,13 +5,11 @@ using System.Text;
|
|||
using Dalamud.Interface;
|
||||
using Glamourer.Automation;
|
||||
using Glamourer.Customization;
|
||||
using Glamourer.Designs;
|
||||
using Glamourer.Interop;
|
||||
using Glamourer.Services;
|
||||
using Glamourer.Structs;
|
||||
using Glamourer.Unlocks;
|
||||
using ImGuiNET;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Widgets;
|
||||
|
|
@ -192,7 +190,7 @@ public class SetPanel
|
|||
if (!equipFlags.HasFlag(flag))
|
||||
continue;
|
||||
|
||||
var item = design.Design.DesignData.Item(slot);
|
||||
var item = design.Design!.DesignData.Item(slot);
|
||||
if (!_itemUnlocks.IsUnlocked(item.ItemId, out _))
|
||||
sb.AppendLine($"{item.Name} in {slot.ToName()} slot is not unlocked. Consider obtaining it via gameplay means!");
|
||||
}
|
||||
|
|
@ -227,7 +225,7 @@ public class SetPanel
|
|||
|
||||
sb.Clear();
|
||||
var sb2 = new StringBuilder();
|
||||
var customize = design.Design.DesignData.Customize;
|
||||
var customize = design.Design!.DesignData.Customize;
|
||||
if (!design.Design.DesignData.IsHuman)
|
||||
sb.AppendLine("The base model id can not be changed automatically to something non-human.");
|
||||
|
||||
|
|
|
|||
|
|
@ -50,10 +50,7 @@ public class StateApplier
|
|||
{
|
||||
var data = GetData(state);
|
||||
if (apply)
|
||||
{
|
||||
state.TempLock();
|
||||
ForceRedraw(data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
@ -76,10 +73,7 @@ public class StateApplier
|
|||
_changeCustomize.UpdateCustomize(mdl, customize.Data);
|
||||
}
|
||||
else
|
||||
{
|
||||
state?.TempLock();
|
||||
_penumbra.RedrawObject(actor, RedrawType.Redraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -377,7 +377,6 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
var actors = _applier.ChangeWetness(state, true);
|
||||
if (redraw)
|
||||
{
|
||||
state.TempLock();
|
||||
_applier.ForceRedraw(actors);
|
||||
}
|
||||
else
|
||||
|
|
@ -419,7 +418,12 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
|||
foreach (var type in Enum.GetValues<ActorState.MetaIndex>())
|
||||
state[type] = StateChanged.Source.Game;
|
||||
|
||||
var actors = source is StateChanged.Source.Manual or StateChanged.Source.Ipc ? ApplyAll(state, redraw) : ActorData.Invalid;
|
||||
var actors = ActorData.Invalid;
|
||||
if (source is StateChanged.Source.Manual or StateChanged.Source.Ipc)
|
||||
{
|
||||
state.TempLock();
|
||||
actors = ApplyAll(state, redraw);
|
||||
}
|
||||
Glamourer.Log.Verbose(
|
||||
$"Reset entire state of {state.Identifier.Incognito(null)} to game base. [Affecting {actors.ToLazyString("nothing")}.]");
|
||||
_event.Invoke(StateChanged.Type.Design, StateChanged.Source.Manual, state, actors, null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue