mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Fix issue with Revert to Game not removing automated changes when it needs to redraw.
This commit is contained in:
parent
58b867bd1e
commit
f4c47520cd
3 changed files with 11 additions and 0 deletions
|
|
@ -62,6 +62,14 @@ public class ActorState
|
||||||
return !IsLocked;
|
return !IsLocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary> Lock for temporary changes until after redrawing. </summary>
|
||||||
|
public bool TempLock()
|
||||||
|
=> Lock(1337);
|
||||||
|
|
||||||
|
/// <summary> Unlock temp locks. </summary>
|
||||||
|
public bool TempUnlock()
|
||||||
|
=> Unlock(1337);
|
||||||
|
|
||||||
/// <summary> This contains whether a change to the base data was made by the game, the user via manual input or through automatic application. </summary>
|
/// <summary> This contains whether a change to the base data was made by the game, the user via manual input or through automatic application. </summary>
|
||||||
private readonly StateChanged.Source[] _sources = Enumerable
|
private readonly StateChanged.Source[] _sources = Enumerable
|
||||||
.Repeat(StateChanged.Source.Game, EquipFlagExtensions.NumEquipFlags + CustomizationExtensions.NumIndices + 5).ToArray();
|
.Repeat(StateChanged.Source.Game, EquipFlagExtensions.NumEquipFlags + CustomizationExtensions.NumIndices + 5).ToArray();
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ public class StateListener : IDisposable
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.TempUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
_funModule.ApplyFun(actor, new Span<CharacterArmor>((void*)equipDataPtr, 10), ref customize);
|
_funModule.ApplyFun(actor, new Span<CharacterArmor>((void*)equipDataPtr, 10), ref customize);
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,7 @@ public class StateManager : IReadOnlyDictionary<ActorIdentifier, ActorState>
|
||||||
var actors = _applier.ChangeWetness(state, true);
|
var actors = _applier.ChangeWetness(state, true);
|
||||||
if (redraw)
|
if (redraw)
|
||||||
{
|
{
|
||||||
|
state.TempLock();
|
||||||
_applier.ForceRedraw(actors);
|
_applier.ForceRedraw(actors);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue