Skip to main content

Config Controller

Introduction

The Config Controller provides a great way of saving easily editable and viewable files. It is great for user preferences and server configurations.

Formatting

Here's an example of how config files are structured:

#This is a comment
key1: value1

#User settings example:
vsync: false
fullscreen: true

#Server configuration example:
max-players: 4
port: 7777

Methods

caution

In the next version Create Option List will be marked as obselete and will be replaced by lists of KeyValuePair.

MethodDescription
GetSettingFromFileReturns the value of a setting in the specified path.
GetSettingReturns the value of a setting from content.
TryGettingSettingFromFileReturns true if it manages to get the value of a setting in the specified path.
TryGettingSettingReturns true if it manages to get the value of a setting from content.
SetSettingChanges the value of a setting in content.
SetSettingFromFileChanges the value of a setting in the specified path.
RepairCreates a file according to the template.
CreateOptionListCreates a list of settings and values separated with ':'.