- Fixed network synchro of vars, needs synctype testing.

This commit is contained in:
MapleWheels
2026-04-09 05:34:50 -04:00
parent 84cb7cfeb7
commit ef66d27ffe
22 changed files with 115 additions and 23 deletions
@@ -0,0 +1,22 @@
using System;
using System.Collections.Immutable;
using System.Linq;
using Barotrauma.LuaCs.Data;
namespace Barotrauma.LuaCs;
public sealed partial class ConfigService
{
public ImmutableArray<ISettingBase> GetDisplayableConfigs()
{
using var _ = _operationLock.AcquireReaderLock().ConfigureAwait(false).GetAwaiter().GetResult();
IService.CheckDisposed(this);
return _settingsInstances.Values
.Where(s => !s.IsDisposed)
.Where(s => s.GetDisplayInfo().ShowInMenus)
.Where(s => !GameMain.IsMultiplayer || s.GetConfigInfo().NetSync != NetSync.ServerAuthority)
.Where(s => s.GetConfigInfo().EditableStates >= _infoProvider.CurrentRunState)
.ToImmutableArray();
}
}