mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Fix advanced parameters not applying after race change.
This commit is contained in:
parent
57f4ccaaa5
commit
547c40fe52
3 changed files with 16 additions and 1 deletions
|
|
@ -58,6 +58,8 @@ public sealed class StateChanged()
|
|||
Manual,
|
||||
Fixed,
|
||||
Ipc,
|
||||
// Only used for CustomizeParameters.
|
||||
Outstanding,
|
||||
}
|
||||
|
||||
public enum Priority
|
||||
|
|
|
|||
|
|
@ -752,6 +752,15 @@ public class StateListener : IDisposable
|
|||
case StateChanged.Source.Ipc:
|
||||
state.BaseData.Parameters.Set(flag, newValue);
|
||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||
break;
|
||||
case StateChanged.Source.Outstanding:
|
||||
state.BaseData.Parameters.Set(flag, newValue);
|
||||
if (_config.UseAdvancedParameters)
|
||||
{
|
||||
model.ApplySingleParameterData(flag, state.ModelData.Parameters);
|
||||
state[flag] = StateChanged.Source.Manual;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,8 +403,12 @@ public class StateManager(
|
|||
foreach (var slot in CrestExtensions.AllRelevantSet.Where(design.DoApplyCrest))
|
||||
_editor.ChangeCrest(state, slot, design.DesignData.Crest(slot), source, out _, key);
|
||||
|
||||
var paramSource = source is StateChanged.Source.Manual && redraw
|
||||
? StateChanged.Source.Outstanding
|
||||
: source;
|
||||
|
||||
foreach (var flag in CustomizeParameterExtensions.AllFlags.Where(design.DoApplyParameter))
|
||||
_editor.ChangeParameter(state, flag, design.DesignData.Parameters[flag], source, out _, key);
|
||||
_editor.ChangeParameter(state, flag, design.DesignData.Parameters[flag], paramSource, out _, key);
|
||||
}
|
||||
|
||||
var actors = ApplyAll(state, redraw, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue