X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/gitweb.css?a=blobdiff_plain;f=rogue_chat.html;h=16a27ba68a4b6739615a506b4497088598d80d44;hb=79fb5ce7f20c880164d98fd47640e742041e2fd9;hp=51e8078611bf510f5c4656f7724f3dfecaf643a0;hpb=87b8e08add4c032f4f0aa7f07f4964719bbc4236;p=plomrogue2
diff --git a/rogue_chat.html b/rogue_chat.html
index 51e8078..16a27ba 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -57,7 +57,6 @@ keyboard input/control:
-
@@ -67,6 +66,7 @@ keyboard input/control:
+
@@ -513,7 +513,7 @@ let server = {
game.thing_types[tokens[1]] = tokens[2]
} else if (tokens[0] === 'THING_CARRYING') {
let t = game.get_thing(tokens[1], false);
- t.carrying = t = game.get_thing(tokens[2], false);
+ t.carrying = game.get_thing(tokens[2], false);
} else if (tokens[0] === 'THING_INSTALLED') {
let t = game.get_thing(tokens[1], false);
t.installed = true;
@@ -705,7 +705,7 @@ let tui = {
this.mode_play.available_modes = ["chat", "study", "edit", "admin_enter",
"command_thing", "take_thing", "drop_thing"]
this.mode_play.available_actions = ["move", "teleport", "door", "consume",
- "install", "wear", "spin"];
+ "wear", "spin"];
this.mode_study.available_modes = ["chat", "play", "admin_enter", "edit"]
this.mode_study.available_actions = ["toggle_map_mode", "move_explorer"];
this.mode_admin.available_modes = ["admin_thing_protect", "control_pw_type",
@@ -717,7 +717,8 @@ let tui = {
this.mode_edit.available_modes = ["write", "annotate", "portal", "name_thing",
"password", "chat", "study", "play",
"admin_enter", "enter_face"]
- this.mode_edit.available_actions = ["move", "flatten", "toggle_map_mode"]
+ this.mode_edit.available_actions = ["move", "flatten", "install",
+ "toggle_map_mode"]
this.inputEl = document.getElementById("input");
this.inputEl.focus();
this.switch_mode('waiting_for_server');
@@ -1214,7 +1215,8 @@ let tui = {
content += this.mode.list_available_modes();
let start_x = 0;
if (!this.mode.has_input_prompt) {
- start_x = this.window_width
+ start_x = this.window_width;
+ this.draw_links = false;
}
terminal.drawBox(0, start_x, terminal.rows, this.window_width);
let [lines, _] = this.msg_into_lines_of_width(content, this.window_width);
@@ -1241,6 +1243,7 @@ let tui = {
}
},
full_refresh: function() {
+ this.draw_links = true;
this.links = {};
terminal.drawBox(0, 0, terminal.rows, terminal.cols);
this.recalc_input_lines();
@@ -1261,6 +1264,9 @@ let tui = {
if (this.show_help) {
this.draw_help();
}
+ if (!this.draw_links) {
+ this.links = {};
+ }
terminal.refresh();
}
}
@@ -1589,8 +1595,6 @@ tui.inputEl.addEventListener('keydown', (event) => {
server.send(["TASK:INTOXICATE"]);
} else if (event.key === tui.keys.door && tui.task_action_on('door')) {
server.send(["TASK:DOOR"]);
- } else if (event.key === tui.keys.install && tui.task_action_on('install')) {
- server.send(["TASK:INSTALL"]);
} else if (event.key === tui.keys.wear && tui.task_action_on('wear')) {
server.send(["TASK:WEAR"]);
} else if (event.key === tui.keys.spin && tui.task_action_on('spin')) {
@@ -1629,6 +1633,8 @@ tui.inputEl.addEventListener('keydown', (event) => {
server.send(['TASK:MOVE', tui.movement_keys[event.key]]);
} else if (event.key === tui.keys.flatten && tui.task_action_on('flatten')) {
server.send(["TASK:FLATTEN_SURROUNDINGS", tui.password]);
+ } else if (event.key === tui.keys.install && tui.task_action_on('install')) {
+ server.send(["TASK:INSTALL", tui.password]);
} else if (event.key == tui.keys.toggle_map_mode) {
tui.toggle_map_mode();
}
|