Inventory refuses non-positive counts; unknown saved items kept; factories follow reloads
This commit is contained in:
1 parent
d29df6dab6
commit
6bb47971a3
11 files changed
+334
-215
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user