Handle state reapplication on temporary mod changes.

This commit is contained in:
Ottermandias 2024-02-18 14:45:54 +01:00
parent cdaabc05e9
commit d6575e6e68
2 changed files with 32 additions and 6 deletions

View file

@ -344,6 +344,13 @@ public sealed class StateManager(
StateChanged.Invoke(StateChanged.Type.Reapply, source, state, data, null);
}
public void ReapplyState(Actor actor, ActorState state, StateSource source)
{
var data = Applier.ApplyAll(state,
!actor.Model.IsHuman || CustomizeArray.Compare(actor.Model.GetCustomize(), state.ModelData.Customize).RequiresRedraw(), false);
StateChanged.Invoke(StateChanged.Type.Reapply, source, state, data, null);
}
public void DeleteState(ActorIdentifier identifier)
=> _states.Remove(identifier);
}