Acts as a proxy between plugins and the filesystem so plugins can't go and mess with stuff outside of KSP's install dir. Saves as an XML file in PluginData/assemblyname[/flightname]/config.xml.
More...
Acts as a proxy between plugins and the filesystem so plugins can't go and mess with stuff outside of KSP's install dir. Saves as an XML file in PluginData/assemblyname[/flightname]/config.xml.
KSP.IO.PluginConfiguration.PluginConfiguration |
( |
string |
pathToFile | ) |
|
|
inlineprotected |
Don't use this, use Create.
- Parameters
-
Initialize the configuration object
- Template Parameters
-
T | The plugin type for which it is being initialized |
- Parameters
-
- Returns
- returns a PluginConfiguration object
T KSP.IO.PluginConfiguration.GetValue< T > |
( |
string |
key | ) |
|
|
inline |
Get a typed value from the root node.
- Template Parameters
-
- Parameters
-
key | The key you want to access |
- Returns
- The value you wanted, or null if the key didn't exist.
T KSP.IO.PluginConfiguration.GetValue< T > |
( |
string |
key, |
|
|
T |
_default |
|
) |
| |
|
inline |
Get a typed value from the root node, and set to a default if it doesn't exist.
- Template Parameters
-
- Parameters
-
key | The key you want to access |
_default | The default value, if the key doesn't exist in the map |
- Returns
- The value you wanted, or the default if the key didn't exist.
void KSP.IO.PluginConfiguration.load |
( |
| ) |
|
|
inline |
void KSP.IO.PluginConfiguration.save |
( |
| ) |
|
|
inline |
void KSP.IO.PluginConfiguration.SetValue |
( |
string |
key, |
|
|
object |
value |
|
) |
| |
|
inline |
Set a configuration key's value
- Parameters
-
key | The key's name |
value | A value |
Object KSP.IO.PluginConfiguration.this[string key] |
|
getset |
Return configuration key from the root node.
- Parameters
-
key | The configuration key's name |
- Returns
- The value desired
The documentation for this class was generated from the following file: