tModLoader v2024.05
A mod to make and play Terraria mods
Preferences Class Reference

Public Member Functions

 Preferences (string path, bool parseAllTypes=false, bool useBson=false)
void Clear ()
bool Contains (string name)
void Get< T > (string name, ref T currentValue)
Get< T > (string name, T defaultValue)
List< string > GetAllKeys ()
bool Load ()
void Put (string name, object value)
bool Save (bool canCreateFile=true)
delegate void TextProcessAction (ref string text)

Public Attributes

bool AutoSave
readonly bool UseBson


Action< PreferencesOnLoad
TextProcessAction OnProcessText
Action< PreferencesOnSave