</style>
</head><body>
<div>
-terminal rows: <input id="n_rows" type="number" step=4 min=8 value=24 />
-terminal columns: <input id="n_cols" type="number" step=4 min=20 value=80 />
+terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
+terminal columns: <input id="n_cols" type="number" step=4 min=80 value=80 />
</div>
<pre id="terminal" style="display: inline-block;"></pre>
<textarea id="input" style="opacity: 0; width: 0px;"></textarea>
<script>
"use strict";
let websocket_location = "wss://plomlompom.com/rogue_chat/";
+//let websocket_location = "ws://localhost:8000/";
let rows_selector = document.getElementById("n_rows");
let cols_selector = document.getElementById("n_cols");
} else if (tokens[0] === 'ANNOTATION') {
let position = parser.parse_yx(tokens[1]);
explorer.update_info_db(position, tokens[2]);
+ tui.restore_input_values();
+ tui.full_refresh();
} else if (tokens[0] === 'UNHANDLED_INPUT') {
tui.log_msg('? unknown command');
} else if (tokens[0] === 'PLAY_ERROR') {
+ tui.log_msg('? ' + tokens[1]);
terminal.blink_screen();
} else if (tokens[0] === 'ARGUMENT_ERROR') {
tui.log_msg('? syntax error: ' + tokens[1]);
this.map_mode = 'terrain';
if (mode.shows_info && game.player_id in game.things) {
explorer.position = game.things[game.player_id].position;
+ explorer.query_info();
}
this.mode = mode;
this.empty_input();
tui.password = tui.inputEl.value
tui.switch_mode(mode_play);
} else if (tui.mode == mode_chat && event.key == 'Enter') {
- let [tokens, token_starts] = parser.tokenize(tui.inputEl.value);
+ let tokens = parser.tokenize(tui.inputEl.value);
if (tokens.length > 0 && tokens[0].length > 0) {
if (tui.inputEl.value[0][0] == '/') {
if (tokens[0].slice(1) == 'play' || tokens[0][1] == tui.keys.switch_to_play) {
}, false);
rows_selector.addEventListener('input', function() {
- if (rows_selector.value % 4 != 0) {
+ if (rows_selector.value % 4 != 0 || rows_selector.value < 24) {
return;
}
window.localStorage.setItem(rows_selector.id, rows_selector.value);
tui.full_refresh();
}, false);
cols_selector.addEventListener('input', function() {
- if (cols_selector.value % 4 != 0) {
+ if (cols_selector.value % 4 != 0 || cols_selector.value < 80) {
return;
}
window.localStorage.setItem(cols_selector.id, cols_selector.value);