From 20d4bb1ef43f5e1170fa7ae5ea470a5644466fe1 Mon Sep 17 00:00:00 2001 From: Miran Date: Sat, 15 Jun 2024 12:33:02 +0200 Subject: [PATCH] Cleo scripts listing with modloader --- source/CScriptEngine.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/CScriptEngine.cpp b/source/CScriptEngine.cpp index 91e6be96..6c8d0f29 100644 --- a/source/CScriptEngine.cpp +++ b/source/CScriptEngine.cpp @@ -1013,11 +1013,21 @@ namespace CLEO } }; - auto searchPattern = Filepath_Cleo + "\\*.*"; + auto searchPattern = Filepath_Cleo + "\\*" + cs_ext; auto list = CLEO_ListDirectory(nullptr, searchPattern.c_str(), false, true); processFileList(list); CLEO_StringListFree(list); + searchPattern = Filepath_Cleo + "\\*" + cs3_ext; + list = CLEO_ListDirectory(nullptr, searchPattern.c_str(), false, true); + processFileList(list); + CLEO_StringListFree(list); + + searchPattern = Filepath_Cleo + "\\*" + cs4_ext; + list = CLEO_ListDirectory(nullptr, searchPattern.c_str(), false, true); + processFileList(list); + CLEO_StringListFree(list); + if (!found.empty()) { TRACE("Starting CLEO scripts");