     else
       top = @objectsAsArray().filter (o) ->
         o? and o.location_id == null
-    top.map (o) ->
-      id: o.id
-      name: o.name
-      contents: contents o
+    top.map show
 
   usernameTaken: (username) ->
     !!(@players.filter (player) -> player.username == username).length

    else
      top = @objectsAsArray().filter (o) ->
        o? and o.parent_id == null
    top.map (o) ->
      id: o.id
      name: o.name
      children: children o

  location_tree: (root_id) ->
    contents = (o) =>
      o.contents().map (p) ->
        id: p.id
        name: p.name
        contents: contents p

    if root_id?
      root = @findById root_id

      !!object.name.match regex

  inheritance_tree: (root_id) ->
    aliases = @globalAliases()

    children = (o) =>
      child_os = @objectsAsArray().filter (other_o) ->
        other_o.parent_id == o.id
      child_os.map show

    show = (o) ->
      x =
        id: o.id
        name: o.name
      if aliases[o.id]?
        x.alias = aliases[o.id]
      x.children = children o
      x

    if root_id?
      root = @findById root_id
