- Fixed the server not loading saved convars and not having absolute authority.

This commit is contained in:
MapleWheels
2026-02-10 18:48:31 -05:00
parent 6bbe5be5e6
commit 9e2fc13460
2 changed files with 6 additions and 0 deletions
@@ -63,10 +63,15 @@ public class SettingsEntryRegistrar : ISettingsRegistrationProvider
private bool IsValueChangeAllowed(IConfigInfo info, OneOf<string, XElement, object> newValue, private bool IsValueChangeAllowed(IConfigInfo info, OneOf<string, XElement, object> newValue,
Func<OneOf<string, XElement, object>, bool> valueChangePredicate) Func<OneOf<string, XElement, object>, bool> valueChangePredicate)
{ {
#if CLIENT
return !info.Element.GetAttributeBool("ReadOnly", false) return !info.Element.GetAttributeBool("ReadOnly", false)
|| info.EditableStates < _infoProvider.CurrentRunState || info.EditableStates < _infoProvider.CurrentRunState
|| valueChangePredicate is null || valueChangePredicate is null
|| valueChangePredicate.Invoke(newValue); || valueChangePredicate.Invoke(newValue);
#else
// Server has absolute authority.
return true;
#endif
} }
public void Dispose() public void Dispose()
@@ -367,6 +367,7 @@ namespace Barotrauma
registrationProvider.RegisterTypeProviders(ConfigService, null); registrationProvider.RegisterTypeProviders(ConfigService, null);
} }
Logger.LogResults(PackageManagementService.LoadPackagesInfo(GetEnabledPackagesList())); Logger.LogResults(PackageManagementService.LoadPackagesInfo(GetEnabledPackagesList()));
Logger.LogResults(ConfigService.LoadSavedConfigsValues());
LoadLuaCsConfig(); LoadLuaCsConfig();
} }