Skip to content

Commit

Permalink
Add PREPEND_STRING and APPEND_STRING executors
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnologicNick committed Oct 10, 2021
1 parent a7cdc23 commit 7b8e384
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions PluginDevFolder/SMLuaHook/lua_hook_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,16 @@ namespace LuaHook {
"APPEND_FILE", [](std::string* input, std::map<std::string, std::any>& fields, hookItem& hookItem, executor& executor) {
return input->append("\n").append(LuaHook::ExecutorHelper::readFile(PathHelper::resolvePath(executor.j_executor.at("file"))));
}
},
{
"PREPEND_STRING", [](std::string* input, std::map<std::string, std::any>& fields, hookItem& hookItem, executor& executor) {
return input->insert(0, executor.j_executor.at("string").get<std::string>().append("\n"));
}
},
{
"APPEND_STRING", [](std::string* input, std::map<std::string, std::any>& fields, hookItem& hookItem, executor& executor) {
return input->append("\n").append(executor.j_executor.at("string"));
}
}
};

Expand Down

0 comments on commit 7b8e384

Please sign in to comment.