Skip to main content

SettingsManager

A class in Root.Township, Alta.Utilities.

Gives access to the game's settings files: GameConfiguration in the storage folder and LauncherSettings in the install folder. Loaded on first use.

Constructors​

MemberWhat it is
SettingsManager()Creates a SettingsManager with default values.

Fields​

3 private and internal fields
MemberWhat it is
private static SettingsFileAccess<GameSettings> gameConfigBacking field for GameConfig.
private static SettingsFileAccess<LauncherSettings> launcherConfigBacking field for LauncherConfig.
private static readonly Logger loggerClass logger.

Properties​

MemberWhat it is
ISettingsFileAccess Game { get; }Instance access to GameConfig.
static SettingsFileAccess<GameSettings> GameConfig { get; }The GameConfiguration settings file in the storage folder, created on first access.
ISettingsFileAccess Launcher { get; }Instance access to LauncherConfig.
static SettingsFileAccess<LauncherSettings> LauncherConfig { get; }The LauncherSettings file in the game's install folder, created on first access.

Methods​

MemberWhat it is
static bool GetSettingsFromString(string settingsName, out ISettingsFileAccess access)Looks up settings by name: "game" gives the game config, "server" the running server's config. Used by console commands.