public RegulationFileParamDumpReader(FileInfo path) { var regulation = RegulationFile.Load(path); Params = regulation.Files .Where(f => f.Name.EndsWith(".param")) .ToDictionary(file => Path.GetFileNameWithoutExtension(file.Name), file => PARAM.Read(file.Bytes)); }
public static BND4 Load(FileInfo path) { return(path.Extension switch { ".bdt" => RegulationFile.DecryptDS3Regulation(path.FullName), ".dcx" => BND4.Read(path.FullName), _ => throw new InvalidOperationException($"{path.Name} is not a valid parambnd or regulation file") });
public void Dispose() { if (RegulationPath.Extension == "bdt") { RegulationFile.EncryptDS3Regulation(RegulationPath.FullName, Regulation); } else { Regulation.Write(RegulationPath.FullName); } }
public RegulationFileParamDumpWriter(FileInfo path) { RegulationPath = path; Regulation = RegulationFile.Load(path); }