public CachedFile(string _path, ZipArchiveEntry _zipEntry, bool _allowOverwrite) { Path = _path; zipEntry = _zipEntry; allowOverwrite = _allowOverwrite; FileType = CachedFileType.Stream; }
private void Add(string path, object data, CachedFileType type, bool allowOverwrite = true) { var cachedFile = new CachedFile(path, data, allowOverwrite); if (data.GetType() == typeof(EffectContainerFile)) { EffectContainerFile ecf = EffectContainerFile.New(); ecf.AddEffects(((EffectContainerFile)data).Effects); cachedFile.backupEffectContainerFile = ecf; } else if (data.GetType() == typeof(ACB_File)) { //Might be better to change this to a shallow-copy ACB_File acb = ACB_File.NewXv2Acb(); foreach (var cue in ((ACB_File)data).Cues) { acb.CopyCue((int)cue.ID, (ACB_File)data); } cachedFile.backupBgmFile = acb; } cachedFiles.Add(cachedFile); }