@verb #1208:"transport to" this none this rxdo #833 @program #1208:"transport to" this none this {object, dest, ?delay = 1, ?perms = caller_perms(), ?controller = this} = args this:believes(callers()) || (perms = caller_perms()) source = object.location if (!this.on) controller:say("Sorry, the transporter system is not turned on. Please try again later.") return 0 elseif (!perms:controls(object) || `!object:will_allow_transport(dest, perms) ! E_VERBNF => 0') controller:say("%1 does not have permission to transport %2 from %3 to %4.", perms, object, source, dest) raise(E_PERM) endif this:log(object, dest, perms) $command_utils:suspend_if_needed() while (object in this.queue) suspend(1) endwhile try this.queue = setadd(this.queue, object) retval = 1 "Assume success." if (object.location == dest) controller:say("Ignoring order to transport %1 from %2 to %3.", object, source, dest) retval = 0 else controller:say("Transporting %1 from %2 to %3.", object, source, dest) suspend(delay) `source:sub_announce_all(this.beam_snd) ! ANY' `dest:sub_announce_all(this.beam_snd) ! ANY' suspend(delay) $msg:mtell(object, "beamout", object) try if (`source:_get_beamout_ok() ! E_PROPNF => 1') this:do_actual_transport(object, dest, perms) else raise(E_PERM) endif except errval (ANY) controller:say("Transporter lock lost. Aborting transport.") retval = errval[1] endtry suspend(delay) $msg:mtell(object, object.location != source ? "beamin" | "nobeam", object) suspend(delay) `source:sub_announce_all(this.nobeam_snd) ! ANY' `dest:sub_announce_all(this.nobeam_snd) ! ANY' endif finally this.queue = setremove(this.queue, object) endtry return retval "Last modified by Slacker (#55) on Sun Nov 3 13:12:49 2002 MST." .