public FileConversionParameter ConstructParameter(string outputPath, WadFileViewModel parameter, WadViewModel wad) { if (this._parameterConstructor != null) { return(this._parameterConstructor.Invoke(outputPath, parameter, wad)); } else { return(new FileConversionParameter(outputPath, parameter.Entry)); } }
private static FileConversionParameter ConstructSimpleSkinWithSkeletonParameter(string outputPath, WadFileViewModel parameter, WadViewModel wad) { // We need to find a skeleton file with the same filename as the Simple Skin string skeletonPath = Path.ChangeExtension(parameter.Path, "skl"); WadEntry skeletonWadEntry = wad.GetAllFiles().FirstOrDefault(x => x.Path == skeletonPath).Entry; if (skeletonWadEntry is null) { throw new Exception(Localization.Get("ConversionSimpleSkinWithSkeletonSkeletonNotFound")); } else { return(new FileConversionParameter(outputPath, parameter.Entry, new List <(FileConversionAdditionalParameterType, WadEntry)>() { (FileConversionAdditionalParameterType.Skeleton, skeletonWadEntry) })); } }