- Weird LuaCs Settings Menu bug present: package is loaded on startup but is then unloaded if the settingsmenu is opened and the package is not in the enabled list.

This commit is contained in:
Maplewheels
2026-02-28 22:10:29 -05:00
parent 28b355911d
commit 09bc2d0891
9 changed files with 52 additions and 191 deletions
@@ -339,6 +339,7 @@ public sealed partial class ConfigService : IConfigService
var toProcessDocs = taskResults
.Where(tr => !tr.IsDefaultOrEmpty)
.SelectMany(tr => tr)
.Where(icf => icf is not null)
.ToImmutableArray();
var instanceQueue = new Queue<(IConfigInfo configInfo, Func<(IConfigService ConfigService, IConfigInfo Info), ISettingBase> factory)>();
@@ -604,6 +605,7 @@ public sealed partial class ConfigService : IConfigService
result.WithReasons(_eventService.PublishEvent<IEventSettingInstanceLifetime>(sub => sub.OnSettingInstanceDisposed(setting)).Reasons);
try
{
_settingsInstances.TryRemove((setting.OwnerPackage, setting.InternalName), out _);
setting.Dispose();
}
catch (Exception e)