Method code for $object_lib.format_object()

[Turn off line numbering]
  1: arg obj, chop;
  2: var len, line, out, c, oname;
  3: 
  4: if (type(obj) == 'frob)
  5:     return ["Frob " + obj.namef('ref)];
  6: c = obj.created_on();
  7: oname = obj.namef('xref);
  8: if ((| obj.aliases() |))
  9:     oname += " (" + obj.aliases().to_english() + ")";
 10: out = ["Object:   " + oname, "Created:  " + (c ? ctime(c) : "(Before Time)"), "Quota:    " + obj.quota() + " bytes" + (obj.quota_exempt() ? " ** exempt **" : ""), "Perms:    " + obj.flags().prefix("+").join(), "Size:     " + obj.size().to_english() + " bytes (on disk)", "Manager:  " + .get_name(obj.manager(), 'namef, ['xref])];
 11: line = obj.writers('literal);
 12: if (line.length() != 1)
 13:     line = "Writers:  " + line.to_english("(none)");
 14: else
 15:     line = "Writer:   " + line[1].namef('xref);
 16: if (chop)
 17:     line = line.chop(chop);
 18: out += [line];
 19: line = obj.trusted('literal) || [];
 20: if (listlen(line)) {
 21:     line = "Trusts:   " + line.to_english("(none)");
 22:     if (chop)
 23:         line = line.chop(chop);
 24:     out += [line];
 25: }
 26: line = obj.parents();
 27: if (line.length() > 1)
 28:     line = "Parents:  " + line.mmap('namef, 'xref).to_english();
 29: else if (!line)
 30:     line = "Parents:  (none)";
 31: else
 32:     line = "Parent:   " + line[1].namef('xref);
 33: if (chop)
 34:     line = line.chop(chop);
 35: out += [line];
 36: if (obj.has_ancestor($located))
 37:     out += ["Location: " + .get_name(obj.location(), 'namef, ['xref])];
 38: if (obj.is($exit))
 39:     out += ["Exit:     " + .get_name(obj.source(), 'namef, ['xref]) + " => " + .get_name(obj.dest(), 'namef, ['xref])];
 40: return out;
 41: 
 42: // $#Edited: 07 Jun 03 12:51 $brandon
 43: // $#Edited: 10 Jun 03 13:27 $user_brandon
 44: // $#Edited: 10 Jun 03 14:25 $user_brandon

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark