Closed Fokson closed 1 year ago
Hi,
Thanks for letting me know, I'm going to have a look. I wonder if that's not because as you have Mods/SaveBackup/SaveBackup.dll it first tries to load Mods/SaveBackup/ and after Mods/SaveBackup.dll.
Also SoGMAPI is not quite up to date with the latest version of the game. I'm going to check if it needs/I can update it
I was able to reproduce and I guess what's happening here is that probably the part of SoG code used to hook the loading of mods changed and now the function is triggered twice.
I'll have a look and I also noticed that .net 4.5 is pretty much outdated now so I should upgrade that
For now as a workaround, I committed a check that the function has already been called or not
private void InitializeBeforeFirstAssetLoaded()
{
...
if (this.IsFirstAssetLoaded)
{
return;
}
...
}
You can test again with the head revision
I'm away from home for a couple of months and don't have VS on my teeny tiny tablet, so I won't be able to compile. I trust that if you could reproduce the error and your changes solved it for you, however, that the issue can safely be closed. Thanks!
SoGMAPI 0.1.2
Upon starting SoGMAPI, every mod in the mods folder will give this error:
[21:48:41 ERROR screen_0 SoGMAPI] - Save Backup 1.0.0 because its DLL couldn't be loaded: Could not load 'C:\Program Files (x86)\Steam\steamapps\common\SecretsOfGrindea\Mods\SaveBackup\SaveBackup.dll' because it was already loaded. Do you have two copies of this mod?
There are not, in fact, two copies of any mod in the mods folder.
To reproduce: Simply start SoGMAPI without changing, adding or removing anything. The two mods it comes with give this error.