ShaderPatch: add <fname> replacement tag (filename), and Nametags patches using it

This commit is contained in:
somewhatlurker
2019-10-07 19:49:38 +11:00
parent 4c54304dff
commit 4b67df0db4
2 changed files with 22 additions and 1 deletions
@@ -238,6 +238,7 @@ void hookedLoadFromFarcThunk(FArchivedFile** ppFile)
modifiedStr = std::string(file.data, file.dataSize);
modifiedStr = std::regex_replace(modifiedStr, patch.dataRegex, patch.dataReplace);
modifiedStr = StringReplace(modifiedStr, "<fname>", file.fileName.GetCharBuf());
if (patch.cfg.length() > 0) // patch has a config setting
{