mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-01-03 14:23:43 +01:00
Fix issue with material value in history.
This commit is contained in:
parent
0d9a0d49ab
commit
59c9601a9b
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
using Glamourer.GameData;
|
using Glamourer.GameData;
|
||||||
using Glamourer.Interop.Material;
|
using Glamourer.Interop.Material;
|
||||||
using Glamourer.Interop.Penumbra;
|
using Glamourer.Interop.Penumbra;
|
||||||
|
using Glamourer.State;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
|
||||||
namespace Glamourer.Designs.History;
|
namespace Glamourer.Designs.History;
|
||||||
|
|
@ -125,7 +126,10 @@ public readonly record struct MaterialTransaction(MaterialValueIndex Index, Colo
|
||||||
=> older is MaterialTransaction other && Index == other.Index ? new MaterialTransaction(Index, other.Old, New) : null;
|
=> older is MaterialTransaction other && Index == other.Index ? new MaterialTransaction(Index, other.Old, New) : null;
|
||||||
|
|
||||||
public void Revert(IDesignEditor editor, object data)
|
public void Revert(IDesignEditor editor, object data)
|
||||||
=> ((DesignManager)editor).ChangeMaterialValue((Design)data, Index, Old);
|
{
|
||||||
|
if (editor is DesignManager e)
|
||||||
|
e.ChangeMaterialValue((Design)data, Index, Old);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks> Only Designs. </remarks>
|
/// <remarks> Only Designs. </remarks>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue