diff --git a/LuaEngine.cpp b/LuaEngine.cpp index ddd8d67..678f94b 100644 --- a/LuaEngine.cpp +++ b/LuaEngine.cpp @@ -178,9 +178,9 @@ void Eluna::AddScriptPath(std::string filename, std::string fullpath) filename = filename.substr(0, extDot); // check extension and add path to scripts to load - if (ext != ".lua" && ext != ".dll") + if (ext != ".lua" && ext != ".dll" && ext != ".ext") return; - bool extension = filename.find(".ext") != std::string::npos; + bool extension = ext == ".ext"; LuaScript script; script.fileext = ext; diff --git a/extensions/FunctionCache.ext.lua b/extensions/FunctionCache.ext similarity index 98% rename from extensions/FunctionCache.ext.lua rename to extensions/FunctionCache.ext index b4cfd4b..386f3a5 100644 --- a/extensions/FunctionCache.ext.lua +++ b/extensions/FunctionCache.ext @@ -4,7 +4,7 @@ -- Please see the included DOCS/LICENSE.md for more information -- --- filename.ext.lua files are loaded before normal .lua files +-- filename.ext files are loaded before normal .lua files -- Functions with parameters or multiple return values are not supported -- These functions should return static data diff --git a/extensions/ObjectVariables.ext.lua b/extensions/ObjectVariables.ext similarity index 97% rename from extensions/ObjectVariables.ext.lua rename to extensions/ObjectVariables.ext index 82e2237..b859c1f 100644 --- a/extensions/ObjectVariables.ext.lua +++ b/extensions/ObjectVariables.ext @@ -4,7 +4,7 @@ -- Please see the included DOCS/LICENSE.md for more information -- --- filename.ext.lua files are loaded before normal .lua files +-- filename.ext files are loaded before normal .lua files local variableStores = { Map = {}, diff --git a/extensions/_Misc.ext.lua b/extensions/_Misc.ext similarity index 82% rename from extensions/_Misc.ext.lua rename to extensions/_Misc.ext index ad17fbe..aed7959 100644 --- a/extensions/_Misc.ext.lua +++ b/extensions/_Misc.ext @@ -4,7 +4,7 @@ -- Please see the included DOCS/LICENSE.md for more information -- --- filename.ext.lua files are loaded before normal .lua files +-- filename.ext files are loaded before normal .lua files -- Randomize random math.randomseed(tonumber(tostring(os.time()):reverse():sub(1,6)))