mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-13 12:14:18 +01:00
Fix palettes not resetting on Reapply Automation with Use Game State as Base.
This commit is contained in:
parent
1ab9d5a2a7
commit
3b5f89e6a1
2 changed files with 8 additions and 5 deletions
|
|
@ -274,7 +274,7 @@ public class AutoDesignApplier : IDisposable
|
|||
CustomizeParameterFlag totalParameterFlags = 0;
|
||||
byte totalMetaFlags = 0;
|
||||
if (set.BaseState == AutoDesignSet.Base.Game)
|
||||
_state.ResetStateFixed(state);
|
||||
_state.ResetStateFixed(state, respectManual);
|
||||
else if (!respectManual)
|
||||
state.RemoveFixedDesignSources();
|
||||
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ public class StateManager(
|
|||
_event.Invoke(StateChanged.Type.Reset, StateChanged.Source.Manual, state, actors, null);
|
||||
}
|
||||
|
||||
public void ResetStateFixed(ActorState state, uint key = 0)
|
||||
public void ResetStateFixed(ActorState state, bool respectManualPalettes, uint key = 0)
|
||||
{
|
||||
if (!state.Unlock(key))
|
||||
return;
|
||||
|
|
@ -541,10 +541,13 @@ public class StateManager(
|
|||
|
||||
foreach (var flag in CustomizeParameterExtensions.AllFlags)
|
||||
{
|
||||
if (state[flag] is StateChanged.Source.Fixed)
|
||||
switch (state[flag])
|
||||
{
|
||||
state[flag] = StateChanged.Source.Game;
|
||||
state.ModelData.Parameters[flag] = state.BaseData.Parameters[flag];
|
||||
case StateChanged.Source.Fixed:
|
||||
case StateChanged.Source.Manual when !respectManualPalettes:
|
||||
state[flag] = StateChanged.Source.Game;
|
||||
state.ModelData.Parameters[flag] = state.BaseData.Parameters[flag];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue