tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.IO.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
 

Events

Action< PreferencesOnLoad
 
TextProcessAction OnProcessText
 
Action< PreferencesOnSave