mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 07:32:45 +00:00
Expose TemplateExists() to RM scripts.
This was SVN commit r16804.
This commit is contained in:
@@ -104,6 +104,7 @@ bool CMapGeneratorWorker::Run()
|
||||
m_ScriptInterface->RegisterFunction<void, CMapGeneratorWorker::MaybeGC>("MaybeGC");
|
||||
m_ScriptInterface->RegisterFunction<std::vector<std::string>, CMapGeneratorWorker::GetCivData>("GetCivData");
|
||||
m_ScriptInterface->RegisterFunction<CParamNode, std::string, CMapGeneratorWorker::GetTemplate>("GetTemplate");
|
||||
m_ScriptInterface->RegisterFunction<bool, std::string, CMapGeneratorWorker::TemplateExists>("TemplateExists");
|
||||
m_ScriptInterface->RegisterFunction<std::vector<std::string>, std::string, bool, CMapGeneratorWorker::FindTemplates>("FindTemplates");
|
||||
m_ScriptInterface->RegisterFunction<std::vector<std::string>, std::string, bool, CMapGeneratorWorker::FindActorTemplates>("FindActorTemplates");
|
||||
|
||||
@@ -230,6 +231,12 @@ CParamNode CMapGeneratorWorker::GetTemplate(ScriptInterface::CxPrivate* pCxPriva
|
||||
return templateRoot;
|
||||
}
|
||||
|
||||
bool CMapGeneratorWorker::TemplateExists(ScriptInterface::CxPrivate* pCxPrivate, std::string templateName)
|
||||
{
|
||||
CMapGeneratorWorker* self = static_cast<CMapGeneratorWorker*>(pCxPrivate->pCBData);
|
||||
return self->m_TemplateLoader.TemplateExists(templateName);
|
||||
}
|
||||
|
||||
std::vector<std::string> CMapGeneratorWorker::FindTemplates(ScriptInterface::CxPrivate* pCxPrivate, std::string path, bool includeSubdirectories)
|
||||
{
|
||||
CMapGeneratorWorker* self = static_cast<CMapGeneratorWorker*>(pCxPrivate->pCBData);
|
||||
|
||||
Reference in New Issue
Block a user