Android: allow run without scripting

This commit is contained in:
Andrii Danylchenko
2021-10-15 09:51:32 +03:00
parent 11e6e0d6f7
commit 4da8341024
+11 -2
View File
@@ -182,12 +182,21 @@ void PoolImpl::serializeState(const bool saving, JsonNode & data)
}
ScriptHandler::ScriptHandler()
:erm(nullptr), lua(nullptr)
{
boost::filesystem::path filePath = VCMIDirs::get().fullLibraryPath("scripting", "vcmiERM");
erm = CDynLibHandler::getNewScriptingModule(filePath);
if (boost::filesystem::exists(filePath))
{
erm = CDynLibHandler::getNewScriptingModule(filePath);
}
filePath = VCMIDirs::get().fullLibraryPath("scripting", "vcmiLua");
lua = CDynLibHandler::getNewScriptingModule(filePath);
if (boost::filesystem::exists(filePath))
{
lua = CDynLibHandler::getNewScriptingModule(filePath);
}
}
ScriptHandler::~ScriptHandler() = default;