Dump of #3736 (Defaulting Exit)

@create $exit named Defaulting Exit:Defaulting Exit
"#3736.("key") => E_PERM (Permission denied)
;;#3736.("aliases") = {"Defaulting Exit"}
;;#3736.("object_size") = {2239, 1141286552}

@verb #3736:"oleave_msg" this none this
@program #3736:oleave_msg
z = pass(@args);
if ((typeof(z) == STR) && (z != ""))
  return z;
endif
for k in ({this.name, @this.aliases})
  if (k in {"east", "west", "south", "north", "northeast", "southeast", "southwest", "northwest", "out", "up", "down"})
    return ("goes " + k) + ".";
  elseif (k == "leave")
    return "leaves";
  endif
endfor
return ("leaves for the " + this.name) + ".";
.

@verb #3736:"oarrive_msg" this none this
@program #3736:oarrive_msg
z = pass(@args);
if ((typeof(z) == STR) && (z != ""))
  return z;
else
  back = $nothing;
  for q in (this.dest.exits)
    if ($object_utils:has_property(q, "dest") && (q.dest == this.source))
      back = q;
    endif
  endfor
  if (!valid(back))
    name = "";
  elseif ("up" in (aliases = {back.name, @back.aliases}))
    name = " from above";
  elseif ("down" in aliases)
    name = " from below";
  else
    name = "";
    for q in ({"north", "south", "east", "west", "northeast", "southeast", "southwest", "northwest"})
      if (q in aliases)
        name = " from the " + q;
      endif
    endfor
  endif
  return ("arrives" + name) + ".";
endif
.

@verb #3736:"moveto" this none this
@program #3736:moveto
result = ((caller_perms() == this.owner) || (args[1] == $nothing)) ? pass(@args) | 0;
return result;
.

"***finished***