[Turn on line numbering]arg ind, done, depth, max, yes, no, above; var c, anc, list, id, perms, f, show, myflags; myflags = .flags(); show = 1; if (yes) { for f in (yes) { if (!(f in myflags)) { show = 0; break; } } } if (no) { for f in (myflags) { if (f in no) { show = 0; break; } } } if (show) { id = ind + this() + " " + $object_lib.see_perms(this()); for anc in (dict_keys(done)) { if (has_ancestor(anc)) return above ? [id + " (ABOVE)"] : []; } if (listlen(parents()) > 1) id += " (MI)"; list = [id]; } else { list = []; } ind += " "; depth++; // check children if (!max || max != depth) { for c in (children()) { list += c.format_descendants(ind, done, depth, max, yes, no, above); done = dict_add(done, c, 1); pause(); } } return list;
// Created as a part of ColdCore, see: @help Credit