Added method to copy RpfFile to Mods folder, and some helper functions

This commit is contained in:
PNWParksFan
2019-06-03 00:12:52 -07:00
Unverified
parent 4559312f1c
commit 8c05eac5b5
2 changed files with 48 additions and 4 deletions
+4 -2
View File
@@ -215,8 +215,10 @@ namespace CodeWalker.GameFiles
}
public RpfFile FindRpfFile(string path) => FindRpfFile(path, false);
public RpfFile FindRpfFile(string path)
public RpfFile FindRpfFile(string path, bool exactPathOnly)
{
RpfFile file = null; //check the dictionary
@@ -233,7 +235,7 @@ namespace CodeWalker.GameFiles
string lpath = path.ToLowerInvariant(); //try look at names etc
foreach (RpfFile tfile in AllRpfs)
{
if (tfile.NameLower == lpath)
if (!exactPathOnly && tfile.NameLower == lpath)
{
return tfile;
}