514 @verb #3:"eject*_basic" this none this rxdo #55 @program #3:"eject*_basic" this none this "Ejects any object contained within this object." "Returns a list of the errors encountered for each attempt to try and move" "the object elsewhere until it finally succeeds." "If the last value in the returned list is an error, then all movement attempts failed!" {what} = args "If `caller == this', you skip the E_PERM automatically. Otherwise, your caller_perms() has to control `this'." if (caller != this && (!caller_perms():controls(this) && (!caller_perms():isa($guardian) && !`this:can_eject(caller_perms(), what) ! E_VERBNF => 0'))) raise(E_PERM) elseif (what.location != this) " raise(E_PERM);" "Why are we raising E_PERM?!" return endif tries = {@this:locations(), @valid(what.home) && what.home != this ? {what.home} | {}, $junk_pile} anch = what.anchor what.anchor = #-1 move_errs = {} for x in (tries) if (`x:acceptable(what) ! ANY => 0' && (x == $junk_pile || `what:moveable(x) ! ANY => 0')) move_err = `move(what, x) ! ANY' move_errs = {@move_errs, move_err} if (typeof(move_err) != $ERR) return move_errs endif endif endfor what.anchor = anch return move_errs "Last modified by Dax (#789) on Wed May 4 06:46:28 2005 MDT." . 0