48 for(
const std::string& depName : m_dependencies) {
56 if(dep->hasDependency(m_name,
true))
59 if(!dep->isLoaded() && !dep->load())
66 for(
const std::string& script : m_scripts) {
71 const std::string& onLoadBuffer = std::get<0>(m_onLoadFunc);
72 const std::string& onLoadSource = std::get<1>(m_onLoadFunc);
73 if(!onLoadBuffer.empty()) {
102 for(
const std::string& modName : m_loadLaterModules) {
106 else if(!dep->isLoaded())
120 const std::string& onUnloadBuffer = std::get<0>(m_onUnloadFunc);
121 const std::string& onUnloadSource = std::get<1>(m_onUnloadFunc);
122 if(!onUnloadBuffer.empty()) {
161 if(module->isLoaded() && module->hasDependency(m_name))
169 if(std::find(m_dependencies.begin(), m_dependencies.end(), name) != m_dependencies.end())
173 for(
const std::string& depName : m_dependencies) {
175 if(dep && dep->hasDependency(name,
true))
185 lua->
getRef(m_sandboxEnv);
191 const static std::string none =
"none";
192 m_description = moduleNode->
valueAt(
"description", none);
193 m_author = moduleNode->
valueAt(
"author", none);
194 m_website = moduleNode->
valueAt(
"website", none);
195 m_version = moduleNode->
valueAt(
"version", none);
196 m_autoLoad = moduleNode->
valueAt<
bool>(
"autoload",
false);
197 m_reloadable = moduleNode->
valueAt<
bool>(
"reloadable",
true);
198 m_sandboxed = moduleNode->
valueAt<
bool>(
"sandboxed",
false);
199 m_autoLoadPriority = moduleNode->
valueAt<
int>(
"autoload-priority", 9999);
203 m_dependencies.push_back(tmp->value());
213 m_loadLaterModules.push_back(tmp->value());
217 m_onLoadFunc = std::make_tuple(node->value(),
"@" + node->source() +
":[" + node->tag() +
"]");
220 m_onUnloadFunc = std::make_tuple(node->value(),
"@" + node->source() +
":[" + node->tag() +
"]");