Inventory refuses non-positive counts; unknown saved items kept; factories follow reloads

This commit is contained in:
cthangover committed 2026-10-21 12:31:55 +02:00
1 parent d29df6dab6
commit 6bb47971a3
11 files changed
+334 -215

No files matched your search

+5 -4
View File
@@ -52,12 +52,13 @@ namespace Cthangover.Core.Factories.Impls
/// </summary>
private Dictionary<string, RecipeInfo> EnsureInfos()
{
if (_allInfos != null)
return _allInfos;
// The resolver's dictionary identity is the data snapshot: a new one drops the built recipes.
var infos = Entities.Collect<RecipeInfo>();
if (ModManager.Instance.IsInitialized)
if (!ReferenceEquals(infos, _allInfos))
{
_allInfos = infos;
_cache.Clear();
}
return infos;
}