[Turn off line numbering]
1: arg ind, done, depth, max, yes, no, above;
2: var c, anc, list, id, perms, f, show, myflags;
3:
4: myflags = .flags();
5: show = 1;
6: if (yes) {
7: for f in (yes) {
8: if (!(f in myflags)) {
9: show = 0;
10: break;
11: }
12: }
13: }
14: if (no) {
15: for f in (myflags) {
16: if (f in no) {
17: show = 0;
18: break;
19: }
20: }
21: }
22: if (show) {
23: id = ind + this() + " " + $object_lib.see_perms(this());
24: for anc in (dict_keys(done)) {
25: if (has_ancestor(anc))
26: return above ? [id + " (ABOVE)"] : [];
27: }
28: if (listlen(parents()) > 1)
29: id += " (MI)";
30: list = [id];
31: } else {
32: list = [];
33: }
34: ind += " ";
35: depth++;
36:
37: // check children
38: if (!max || max != depth) {
39: for c in (children()) {
40: list += c.format_descendants(ind, done, depth, max, yes, no, above);
41: done = dict_add(done, c, 1);
42: pause();
43: }
44: }
45: return list;
["// Created as a part of ColdCore, see: @help Credit"]