Fix issue with MagicStorage and its recursive crafting feature causing a lot of pickups that aren't actually real

This commit is contained in:
OMGeeky
2024-06-09 16:10:32 +02:00
parent ccfcfc1e88
commit 08ad70bcd1
3 changed files with 10 additions and 1 deletions

View File

@@ -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<ItemChecklistPlayer>();
if (!itemChecklistPlayer.foundItem[item.type] && itemChecklistPlayer.findableItems[item.type])
{

View File

@@ -122,5 +122,11 @@ namespace ItemChecklist
}
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
internal static bool IsSimulatingCrafts()
{
return CraftingGUI.SimulatingCrafts;
}
}
}

View File

@@ -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