elif self.mode.name == 'teleport':
self.log_msg("@ May teleport to %s:%s" % (self.teleport_target_host,
self.teleport_target_port));
- self.log_msg("@ Enter 'YES!' to affirm.");
+ self.log_msg("@ Enter 'YES!' to enthusiastically affirm.");
elif self.mode.name == 'annotate' and self.explorer in self.game.info_db:
info = self.game.info_db[self.explorer]
if info != '(none)':
let mode_play = new Mode('play / move around', false, false);
let mode_study = new Mode('check map tiles for messages', false, true);
let mode_edit = new Mode('write ASCII char to map tile', false, false);
-let mode_teleport = new Mode('teleport away?');
+let mode_teleport = new Mode('teleport away?', true);
let mode_portal = new Mode('add portal to map tile', true, true);
let tui = {
this.recalc_input_lines();
} else if (mode == mode_teleport) {
tui.log_msg("@ May teleport to: " + tui.teleport_target);
- tui.log_msg("@ Type Y or y to affirm, other keys to abort.");
+ tui.log_msg("@ Enter 'YES!' to entusiastically affirm.");
}
this.full_refresh();
},
} else if (tui.mode == mode_annotate && event.key == 'Enter') {
explorer.annotate(tui.inputEl.value);
tui.switch_mode(mode_study, true);
+ } else if (tui.mode == mode_teleport && event.key == 'Enter') {
+ if (tui.inputEl.value == 'YES!') {
+ server.reconnect_to(tui.teleport_target);
+ } else {
+ tui.log_msg('@ teleport aborted');
+ tui.switch_mode(mode_play);
+ };
} else if (tui.mode == mode_chat && event.key == 'Enter') {
let [tokens, token_starts] = parser.tokenize(tui.inputEl.value);
if (tokens.length > 0 && tokens[0].length > 0) {