VoidRift / AutoPotion

BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Mod doesn't load without Calamity mod #3

Closed benl9 closed 2 years ago

benl9 commented 2 years ago

Trying to enable the mod without Calamity enabled gives me this:

[00:50:07.651] [.NET ThreadPool Worker/ERROR] [tML]: An error occurred while loading AutoPotion v0.1.16
It has been detected that this mod was built for tModLoader v2022.7.58.4
However, you are using tModLoader v2022.7.58.9
The mod(s) have been automatically disabled.
System.Collections.Generic.KeyNotFoundException: The given key 'CalamityMod' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at AutoPotion.AutoPotionMod.PostSetupContent() in AutoPotionMod.cs:line 65
   at Terraria.ModLoader.ModContent.<>c.<Load>b__42_2(Mod mod) in tModLoader\Terraria\ModLoader\ModContent.cs:line 335
   at Terraria.ModLoader.ModContent.LoadModContent(CancellationToken token, Action`1 loadAction) in tModLoader\Terraria\ModLoader\ModContent.cs:line 382
   at Terraria.ModLoader.ModContent.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModContent.cs:line 334
   at Terraria.ModLoader.ModLoader.Load(CancellationToken token) in tModLoader\Terraria\ModLoader\ModLoader.cs:line 124

If I enable Calamity, then this mod seems to load fine (didn't try starting a game with it tho)

Not sure if this mod is meant to only work with Calamity; if so, I can't find any indication of that in the description

VoidRift commented 2 years ago

I'm so dumb. I coded it the way that if you did not have the Calamity installed the mod would crash. This was not intended. And yes you are right in assuming that this mod does not require Calamity, just a stupid mistake. Fixed it in with version 0.1.17, should not crash if you don't have Calamity installed. Thank you for letting me know.