RPF Explorer import/export .rel XML options

This commit is contained in:
dexy
2019-01-20 09:34:44 +11:00
Unverified
parent f1562e6da0
commit 33af1b45f8
2 changed files with 27 additions and 0 deletions
@@ -46,6 +46,11 @@ namespace CodeWalker.GameFiles
CutFile cut = RpfFile.GetFile<CutFile>(e, data);
return GetXml(cut, out filename);
}
else if (fnl.EndsWith(".rel"))
{
RelFile rel = RpfFile.GetFile<RelFile>(e, data);
return GetXml(rel, out filename);
}
filename = fn;
return string.Empty;
}
@@ -99,6 +104,12 @@ namespace CodeWalker.GameFiles
filename = string.Empty;
return string.Empty;
}
public static string GetXml(RelFile rel, out string filename)
{
var fn = (rel?.RpfFileEntry?.Name) ?? "";
filename = fn + ".xml";
return RelXml.GetXml(rel);
}