Class ModSettingsData
Inheritance
ModSettingsData
Assembly: Assembly-CSharp.dll
Syntax
public class ModSettingsData
Properties
|
Improve this Doc
View Source
HasLoadedPresets
Declaration
[fsIgnore]
public bool HasLoadedPresets { get; }
Property Value
|
Improve this Doc
View Source
Item[Int32]
Declaration
public Section this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
|
Improve this Doc
View Source
Item[String]
Declaration
public Section this[string sectionName] { get; }
Parameters
Type |
Name |
Description |
String |
sectionName |
|
Property Value
|
Improve this Doc
View Source
Presets
Declaration
public List<Preset> Presets { get; }
Property Value
|
Improve this Doc
View Source
Sections
All Sections in this collection.
Declaration
public SectionCollection Sections { get; set; }
Property Value
|
Improve this Doc
View Source
Version
Declaration
public string Version { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
ApplyPreset(IPreset)
Override current values with a preset.
Declaration
public void ApplyPreset(IPreset preset)
Parameters
Type |
Name |
Description |
IPreset |
preset |
|
|
Improve this Doc
View Source
FillPreset(IPreset, Boolean)
Save preset settings from current values.
Declaration
public void FillPreset(IPreset preset, bool addNewKeys)
Parameters
|
Improve this Doc
View Source
Make a displayable name for a key or section.
Declaration
public static string FormattedName(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
|
Improve this Doc
View Source
GetValue<T>(String, String)
Gets a value with corresponding type from key name.
Declaration
public T GetValue<T>(string sectionName, string keyName)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
HasSettings(Mod)
Check if a mod has settings.
Declaration
public static bool HasSettings(Mod mod)
Parameters
Type |
Name |
Description |
Mod |
mod |
|
Returns
|
Improve this Doc
View Source
ImportLegacyIni(IniData)
Try to parse a legacy ini file.
Declaration
public void ImportLegacyIni(IniData iniData)
Parameters
Type |
Name |
Description |
IniParser.Model.IniData |
iniData |
|
|
Improve this Doc
View Source
IsCompatible(IPreset)
True if preset has the same version of this instance.
Do not rely on this for anything else.
Declaration
public bool IsCompatible(IPreset preset)
Parameters
Type |
Name |
Description |
IPreset |
preset |
|
Returns
|
Improve this Doc
View Source
LoadLocalValues()
Deserialize local values from disk. Be sure to save defaults before if needed.
Declaration
public void LoadLocalValues()
|
Improve this Doc
View Source
LoadPresets()
Import presets from mod and local presets from disk.
Declaration
public void LoadPresets()
|
Improve this Doc
View Source
Make(Mod)
Import settings data from a mod.
Declaration
public static ModSettingsData Make(Mod mod)
Parameters
Type |
Name |
Description |
Mod |
mod |
|
Returns
|
Improve this Doc
View Source
RestoreDefaults()
Restore values previously set as defaults.
Declaration
public void RestoreDefaults()
|
Improve this Doc
View Source
Save()
Save local settings to disk.
Declaration
|
Improve this Doc
View Source
SaveDefaults()
Save a copy of current values which can be restored later.
Declaration
public void SaveDefaults()
|
Improve this Doc
View Source
SavePresets()
Write all local presets to disk.
Declaration
public void SavePresets()
|
Improve this Doc
View Source
TryGetKey<T>(String, String, out T)
Seeks a key with corresponding name and type.
Declaration
public bool TryGetKey<T>(string sectionName, string keyName, out T key)
where T : Key
Parameters
Type |
Name |
Description |
String |
sectionName |
|
String |
keyName |
|
T |
key |
|
Returns
Type Parameters