diff --git a/docs/changelog.txt b/docs/changelog.txt index 58669e321..949e8fe56 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -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 can now add internal files to an ``scripts/internal`` folder. ## Ruby - Updated ``item_find`` and ``building_find`` to use centralized logic that works on more screens diff --git a/library/Core.cpp b/library/Core.cpp index 20d9c994b..c6ce9ea48 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -317,7 +317,7 @@ static void listScripts(PluginManager *plug_mgr, std::map &pset, pset[key] = help; } } - else if (all && !files[i].empty() && files[i][0] != '.') + else if (all && !files[i].empty() && files[i][0] != '.' && files[i] != "internal") { listScripts(plug_mgr, pset, path+files[i]+"/", all, prefix+files[i]+"/"); } diff --git a/travis/script-docs.py b/travis/script-docs.py index b2c8063bf..a102ae35b 100755 --- a/travis/script-docs.py +++ b/travis/script-docs.py @@ -81,7 +81,9 @@ def check_file(fname): def main(): """Check that all DFHack scripts include documentation""" err = 0 - for root, _, files in os.walk(SCRIPT_PATH): + exclude = set(['internal']) + for root, dirs, files in os.walk(SCRIPT_PATH, topdown=True): + dirs[:] = [d for d in dirs if d not in exclude] for f in files: if f[-3:] in {'.rb', 'lua'}: err += check_file(join(root, f))