Data nodes starting with "_" are metadata
authorJeremy Stanley <fungi@yuggoth.org>
Sat, 16 Sep 2017 17:35:48 +0000 (17:35 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 16 Sep 2017 17:35:48 +0000 (17:35 +0000)
Avoid loading data nodes with a "_" prefix as Universe content.
These are only used as file-local metadata.

mudpy/data.py

index 99e6d21..77b2142 100644 (file)
@@ -61,6 +61,8 @@ class Data:
                     if included not in includes:
                         includes.append(included)
                 continue
                     if included not in includes:
                         includes.append(included)
                 continue
+            if node.startswith("_"):
+                continue
             facet_pos = node.rfind(".") + 1
             if not facet_pos:
                 mudpy.misc.Element(node, self.universe, self, old_style=True)
             facet_pos = node.rfind(".") + 1
             if not facet_pos:
                 mudpy.misc.Element(node, self.universe, self, old_style=True)