Files
RobustToolbox/Robust.Shared/Configuration/IConfigurationManagerInternal.cs
Pieter-Jan Briers ec26ef1e42 Check for CVar typos in server startup.
We now check the list of CVars to see if there's any unregistered CVars specified (i.e. in config, but not actually registered by the code). This would probably indicate a typo.

Only doing this on the server for now. The client may share config files from multiple codebases and end up with unknown CVars from there. This is probably fine, since those would be applied more automatically and not prone to config file typos as much.
2022-12-16 23:24:53 +01:00

32 lines
1.0 KiB
C#

using System.Collections.Generic;
using System.Reflection;
namespace Robust.Shared.Configuration
{
internal interface IConfigurationManagerInternal : IConfigurationManager
{
void OverrideConVars(IEnumerable<(string key, string value)> cVars);
void LoadCVarsFromAssembly(Assembly assembly);
void Initialize(bool isServer);
void Shutdown();
/// <summary>
/// Sets up the ConfigurationManager and loads a TOML configuration file.
/// </summary>
/// <param name="configFile">the full name of the config file.</param>
HashSet<string> LoadFromFile(string configFile);
/// <summary>
/// Specifies the location where the config file should be saved, without trying to load from it.
/// </summary>
void SetSaveFile(string configFile);
/// <summary>
/// Check the list of CVars to make sure there's no unused CVars set, which might indicate a typo or such.
/// </summary>
void CheckUnusedCVars();
}
}