Lua: Pass plugin path and filename to queue for later

This commit is contained in:
Lion Kortlepel
2021-09-18 01:20:26 +02:00
parent f98ef7d41c
commit 38dffc5462
4 changed files with 14 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ TLuaPlugin::TLuaPlugin(TLuaEngine& Engine, const TLuaPluginConfig& Config, const
beammp_debug("Successfully read \"" + Entry.string() + "\" (" + std::to_string(NRead) + " Bytes)");
mFileContents[fs::relative(Entry).string()] = Contents;
// Execute first time
auto Result = mEngine.EnqueueScript(mConfig.StateId, Contents);
auto Result = mEngine.EnqueueScript(mConfig.StateId, { Contents, Entry, MainFolder });
ResultsToCheck.emplace_back(Entry.string(), std::move(Result));
} else {
beammp_error("Error while reading script file \"" + Entry.string() + "\". Did the file change while reading?");