Skip to content

Commit

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

0 comments on commit a7cdc23

Please sign in to comment.