Method code for $root._display_ancestors()

[Turn off line numbering]
  1: arg space, checked, levels, maxlev;
  2: var c, anc, list, id, perms;
  3: 
  4: id = space + this() + " " + $object_lib.see_perms(this());
  5: for anc in (dict_keys(checked)) {
  6:     if (.has_ancestor(anc))
  7:         return [];
  8: 
  9:     // [id + "  (above)"];
 10: }
 11: if (.parents().length() > 1)
 12:     id += " (MI)";
 13: list = [id];
 14: space += "  ";
 15: levels++;
 16: 
 17: // check parents
 18: if (!maxlev || maxlev != levels) {
 19:     for c in (.parents()) {
 20:         list += c._display_ancestors(space, checked, levels, maxlev);
 21:         checked = dict_add(checked, c, 1);
 22:         pause();
 23:     }
 24: }
 25: return list;

// Created as a part of ColdCore, see: @help Credit

Tlon