mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Fix Item Swaps not updating when mod is changed.
This commit is contained in:
parent
afa11f85e2
commit
2ffbd7beba
1 changed files with 10 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ public class ItemSwapTab : IDisposable, ITab
|
|||
|
||||
_communicator.CollectionChange.Event += OnCollectionChange;
|
||||
_collectionManager.Current.ModSettingChanged += OnSettingChange;
|
||||
_communicator.ModOptionChanged.Event += OnModOptionChange;
|
||||
}
|
||||
|
||||
/// <summary> Update the currently selected mod or its settings. </summary>
|
||||
|
|
@ -99,6 +100,7 @@ public class ItemSwapTab : IDisposable, ITab
|
|||
{
|
||||
_communicator.CollectionChange.Event -= OnCollectionChange;
|
||||
_collectionManager.Current.ModSettingChanged -= OnSettingChange;
|
||||
_communicator.ModOptionChanged.Event -= OnModOptionChange;
|
||||
}
|
||||
|
||||
private enum SwapType
|
||||
|
|
@ -753,4 +755,12 @@ public class ItemSwapTab : IDisposable, ITab
|
|||
_swapData.LoadMod(_mod, _modSettings);
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
private void OnModOptionChange(ModOptionChangeType type, Mod mod, int a, int b, int c)
|
||||
{
|
||||
if (type is ModOptionChangeType.PrepareChange || mod != _mod)
|
||||
return;
|
||||
_swapData.LoadMod(_mod, _modSettings);
|
||||
_dirty = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue