Replaced hardcoded SourceType with custom defined ISourceResolver.

This commit is contained in:
IceReaper
2022-11-06 19:33:01 +01:00
committed by Matthias Mailänder
parent 7188f88ba1
commit 35eb246080
34 changed files with 313 additions and 117 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Installer
{
Log.Write("install", $"Extracting {sourcePath} -> {targetPath}");
var displayFilename = Path.GetFileName(Path.GetFileName(targetPath));
Action<int> onProgress = percent => updateMessage(modData.Translation.GetString(InstallFromDiscLogic.ExtracingProgress, Translation.Arguments("filename", displayFilename, "progress", percent)));
Action<int> onProgress = percent => updateMessage(modData.Translation.GetString(InstallFromSourceLogic.ExtracingProgress, Translation.Arguments("filename", displayFilename, "progress", percent)));
reader.ExtractFile(node.Value.Value, target, onProgress);
}
}