// Token: 0x060000EC RID: 236 RVA: 0x00009720 File Offset: 0x00007920 public AdvancedStringDB() { StringDB strings = ETGMod.Databases.Strings; strings.OnLanguageChanged = (Action <StringTableManager.GungeonSupportedLanguages>)Delegate.Combine(strings.OnLanguageChanged, new Action <StringTableManager.GungeonSupportedLanguages>(this.LanguageChanged)); this.Core = new AdvancedStringDBTable(() => StringTableManager.CoreTable); this.Items = new AdvancedStringDBTable(() => StringTableManager.ItemTable); this.Enemies = new AdvancedStringDBTable(() => StringTableManager.EnemyTable); this.Intro = new AdvancedStringDBTable(() => StringTableManager.IntroTable); this.Synergies = new AdvancedStringDBTable(() => AdvancedStringDB.SynergyTable); }
private static StringDB LoadDatabaseFile(string lang, int idx, bool DumpToFile = false) { StringDB sdb = new StringDB(); sdb.Load($"SaveEditor.Data.{lang}.FILE_{idx:D3}.dat.gz"); if (DumpToFile) { using (var sw = new StreamWriter(File.OpenWrite($"Data\\{lang}\\FILE_{idx:D3}.csv"), Encoding.UTF8)) { for (int i = 0; i < sdb.Strings.Count; i++) { sw.Write(i.ToString()); sw.Write(";"); sw.Write(sdb.Strings[i].Replace("\r", "\\r").Replace("\n", "\\n")); sw.WriteLine(); } } } return(sdb); }
public static void Init(enmLanguage lang = enmLanguage.en, bool DumpToFile = false) { try { Text1 = LoadDatabaseFile(lang.ToString(), 0, DumpToFile); Text2 = LoadDatabaseFile(lang.ToString(), 1, DumpToFile); Text3 = LoadDatabaseFile(lang.ToString(), 2, DumpToFile); BinaryDatabase = new BinaryDB(); BinaryDatabase.Init(); } catch (Exception e) { Console.WriteLine(e); throw new InvalidDataException("Could not load one or more database files, check the data folder!"); } InitLists(DumpToFile); if (DumpToFile) { BinaryDatabase.DumpToJson(); } }
public void Binarize() { StringDB.Binarize(); }
public void Ingest(string outputTextField) { StringDB.Destroy(); StringDB.outputFilePath = outputTextField; StringDB.Ingest(); }
public void PrintDictionary() { Debug.Log(StringDB.ReturnDictionary()); }