mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-22 23:12:59 +08:00
Made progress action optional for RpfFile.Defragment
This commit is contained in:
parent
8478e8c2db
commit
8b7474e1d0
@ -1900,7 +1900,7 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void Defragment(RpfFile file, Action<string, float> progress)
|
public static void Defragment(RpfFile file, Action<string, float> progress = null)
|
||||||
{
|
{
|
||||||
if (file?.AllEntries == null) return;
|
if (file?.AllEntries == null) return;
|
||||||
|
|
||||||
@ -1928,7 +1928,7 @@ namespace CodeWalker.GameFiles
|
|||||||
var entry = allfiles[i];
|
var entry = allfiles[i];
|
||||||
float prog = (float)i / allfiles.Count;
|
float prog = (float)i / allfiles.Count;
|
||||||
string txt = "Relocating " + entry.Name + "...";
|
string txt = "Relocating " + entry.Name + "...";
|
||||||
progress(txt, prog);
|
progress?.Invoke(txt, prog);
|
||||||
|
|
||||||
var sourceblock = entry.FileOffset;
|
var sourceblock = entry.FileOffset;
|
||||||
var blockcount = GetBlockCount(entry.GetFileSize());
|
var blockcount = GetBlockCount(entry.GetFileSize());
|
||||||
|
Loading…
Reference in New Issue
Block a user