private static void loadME1Tlk() { if (File.Exists(LoadedTLKsPathME1)) { List <(int, string)> files = JsonConvert.DeserializeObject <List <(int, string)> >(File.ReadAllText(LoadedTLKsPathME1)); foreach ((int exportnum, string filename) in files) { ME1TalkFiles.LoadTlkData(filename, exportnum); } } else { string path = ME1Directory.CookedPCPath + @"Packages\Dialog\GlobalTlk.upk"; if (File.Exists(path)) { try { IMEPackage pcc = MEPackageHandler.OpenME1Package(path); ME1TalkFiles.tlkList.Add(new ME1TalkFile(pcc, 1)); } catch (Exception) { } } } }
public override void LoadTrack() { Keys.ClearEx(); var trackKeys = Export.GetProperty <ArrayProperty <StructProperty> >("m_aTrackKeys"); var subtitleData = Export.GetProperty <ArrayProperty <StructProperty> >("m_aSubtitleData"); if (trackKeys != null) { int keyindex = 0; foreach (var trackKey in trackKeys) { int strRef = subtitleData?[keyindex]?.GetProp <IntProperty>("nStrRefID"); Keys.Add(new Key(trackKey.GetProp <FloatProperty>("fTime"), ME1TalkFiles.findDataById(strRef, Export.FileRef))); } } }