- 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
@@ -1,5 +1,6 @@
using System;
using System.Collections.Immutable;
using System.Linq;
using Barotrauma.LuaCs.Configuration;
using Barotrauma.LuaCs.Data;
using Barotrauma.Networking;
@@ -9,18 +10,14 @@ namespace Barotrauma.LuaCs;
public sealed partial class ConfigService
{
public ImmutableArray<IDisplayableConfigBase> GetDisplayableConfigs()
public ImmutableArray<ISettingBase> GetDisplayableConfigs()
{
throw new NotImplementedException();
}
using var _ = _operationLock.AcquireReaderLock().ConfigureAwait(false).GetAwaiter().GetResult();
IService.CheckDisposed(this);
public ImmutableArray<IDisplayableConfigBase> GetDisplayableConfigsForPackage(ContentPackage package)
{
throw new NotImplementedException();
}
public Result<ISettingControl> AddConfigControl(IConfigInfo configInfo)
{
throw new NotImplementedException();
return _settingsInstances.Values
.Where(s => !s.IsDisposed)
.Where(s => s.GetDisplayInfo().ShowInMenus)
.ToImmutableArray();
}
}