From 08ad70bcd13bc65f266dc796ded9597b0c4d415f Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sun, 9 Jun 2024 16:10:32 +0200 Subject: [PATCH] Fix issue with MagicStorage and its recursive crafting feature causing a lot of pickups that aren't actually real --- ItemChecklistGlobalItem.cs | 3 +++ MagicStorageIntegration.cs | 6 ++++++ build.txt | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ItemChecklistGlobalItem.cs b/ItemChecklistGlobalItem.cs index 1a4ff80..3dfbd0d 100644 --- a/ItemChecklistGlobalItem.cs +++ b/ItemChecklistGlobalItem.cs @@ -33,6 +33,9 @@ namespace ItemChecklist // TODO, unloaded items, check against?? internal void ItemReceived(Item item) { + if ( MagicStorageIntegration.Enabled && MagicStorageIntegration.IsSimulatingCrafts()) + return; + var itemChecklistPlayer = Main.LocalPlayer.GetModPlayer(); if (!itemChecklistPlayer.foundItem[item.type] && itemChecklistPlayer.findableItems[item.type]) { diff --git a/MagicStorageIntegration.cs b/MagicStorageIntegration.cs index 1163935..cbb9919 100644 --- a/MagicStorageIntegration.cs +++ b/MagicStorageIntegration.cs @@ -122,5 +122,11 @@ namespace ItemChecklist } } } + + [MethodImpl(MethodImplOptions.NoInlining)] + internal static bool IsSimulatingCrafts() + { + return CraftingGUI.SimulatingCrafts; + } } } diff --git a/build.txt b/build.txt index 8248330..3a63f2a 100644 --- a/build.txt +++ b/build.txt @@ -8,4 +8,4 @@ includeSource = true includePDB = true notworkingside = Client buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, lib\*, .gitignore, .git\* -weakReferences = MagicStorage@0.6.0.3 +weakReferences = MagicStorage@0.7.0.0