Fix issue with resetting GEQP parameters on reload (again?)

This commit is contained in:
Ottermandias 2024-11-20 18:08:24 +01:00
parent 3beef61c6f
commit ce75471e51
4 changed files with 15 additions and 3 deletions

@ -1 +1 @@
Subproject commit 1c82c086704e2f1b3608644a9b1d70628fbe0ca9
Subproject commit c855c17cffd7d270c3f013e01767cd052c24c462

@ -1 +1 @@
Subproject commit bd52d080b72d67263dc47068e461f17c93bdc779
Subproject commit dd83f97299ac33cfacb1064bde4f4d1f6a260936

View file

@ -79,6 +79,17 @@ public class MetaDictionary
_globalEqp.Clear();
}
public void ClearForDefault()
{
Count = _globalEqp.Count;
_imc.Clear();
_eqp.Clear();
_eqdp.Clear();
_est.Clear();
_rsp.Clear();
_gmp.Clear();
}
public bool Equals(MetaDictionary other)
=> Count == other.Count
&& _imc.SetEquals(other._imc)

View file

@ -69,7 +69,8 @@ public class ModMetaEditor(
public static bool DeleteDefaultValues(MetaFileManager metaFileManager, MetaDictionary dict)
{
var clone = dict.Clone();
dict.Clear();
dict.ClearForDefault();
var count = 0;
foreach (var (key, value) in clone.Imc)
{