b9a @verb #102:"bf_move" this none this rxdo #55 @program #102:"bf_move" this none this {what, where} = args if (!valid(what)) raise(E_INVARG, tostr("Attempt to move an invalid object (", what, ").")) elseif (what:isa($physical) || what:isa($garbage) && !valid(where)) raise(E_INVARG, tostr("Attempt to move an object to an invalid location (", where, ").")) elseif (valid(where) && where:isa($garbage) && !what:isa($garbage)) raise(E_INVARG, tostr("Attempt to move object to a garbage location (", where, ").")) elseif (!what:isa($physical) && !what:isa($garbage) && where != $nothing) raise(E_INVARG, tostr("Non-physical objects can't be moved.")) elseif (what:contains(where) || where == what) raise(E_RECMOVE, tostr(E_RECMOVE, " since ", what, " contains ", where, ".")) elseif (caller != what && !caller_perms():controls(what)) raise(E_PERM) endif whence = what.location perms = caller_perms() this:_set_move_status({@this._move_status, {movetask = task_id(), status = 0, 0, callers()}}) while (status < 4) status = listassoc(movetask, this._move_status)[2] fork forktask (0) for status in [status..4] if (status < 1) this._move_status[listiassoc(movetask, this._move_status)][2] = 1 r = this:_call_moveable(perms, what, where) if (!r && !perms:isa($guardian)) return endif elseif (status < 2) this._move_status[listiassoc(movetask, this._move_status)][2] = 2 r = this:_call_accept(perms, where, what) if (!r && !perms:isa($guardian)) return endif elseif (status < 3) this._move_status[listiassoc(movetask, this._move_status)][2] = 3 if (valid(whence)) whence:_exitfunc(what, where) endif elseif (status < 4) this._move_status[listiassoc(movetask, this._move_status)][2] = 4 pass(@args) " if (args[1] == #6645)" " $mail_agent:send_message(#8084, {#8084}, \"Exit move!\", {toliteral(callers(1))});" " endif" else if (valid(where)) where:_enterfunc(what, whence) endif endif endfor endfork this._move_status[listiassoc(movetask, this._move_status)][3] = forktask suspend(0) status = listassoc(movetask, this._move_status)[2] if (status == 1 && !perms:isa($guardian)) this._move_status = listdelete(this._move_status, listiassoc(movetask, this._move_status)) raise(E_PERM, tostr(what, " doesn't want to move to ", where, ".")) elseif (status == 2 && !perms:isa($guardian)) this._move_status = listdelete(this._move_status, listiassoc(movetask, this._move_status)) raise(E_NACC, tostr(where, " doesn't want to accept ", what, ".")) endif endwhile this._move_status = listdelete(this._move_status, listiassoc(task_id(), this._move_status)) "Last modified by Lao-Tzu (#8084) on Sat Jul 5 14:53:34 2003 MDT." . 0