support for splitting lua scripts into parts

without polluting the output of #DFHack ls
develop
Myk Taylor 2020-07-20 23:04:23 -07:00
parent 6a851537d5
commit b200219967
2 changed files with 2 additions and 1 deletions

@ -56,6 +56,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Lua
- Added a ``ref_target`` field to primitive field references, corresponding to the ``ref-target`` XML attribute
- Support for splitting scripts into multiple files without polluting the output of '#DFHack ls'. Scripts that end in '-internal.lua' will not be listed, but but they can still be 'require'd from other scripts.
## Ruby
- Updated ``item_find`` and ``building_find`` to use centralized logic that works on more screens

@ -301,7 +301,7 @@ static void listScripts(PluginManager *plug_mgr, std::map<string,string> &pset,
path += '/';
for (size_t i = 0; i < files.size(); i++)
{
if (hasEnding(files[i], ".lua"))
if (hasEnding(files[i], ".lua") && !hasEnding(files[i], "-internal.lua"))
{
string help = getScriptHelp(path + files[i], "--");
string key = prefix + files[i].substr(0, files[i].size()-4);