- Fixed the server not loading saved convars and not having absolute authority.
This commit is contained in:
+5
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user