home · contact · privacy
Add song deletion to MusicPlayer.
[plomrogue2] / rogue_chat.html
index f0f2faa1213ac1786ca59eaaafeb4f4eac9467e9..f7a97ec11325cebb6faf66a769209fceea5aae0e 100644 (file)
@@ -238,7 +238,7 @@ let key_descriptions = {
     'drop_thing': 'drop thing',
     'door': 'open/close',
     'consume': 'consume',
-    'install': 'install',
+    'install': '(un-)install',
     'toggle_map_mode': 'toggle map view',
     'toggle_tile_draw': 'toggle protection character drawing',
     'hex_move_upleft': 'up-left',
@@ -497,6 +497,11 @@ let server = {
             if (t) {
                 t.carrying = true;
             };
+        } else if (tokens[0] === 'THING_INSTALLED') {
+            let t = game.get_thing(tokens[1], false);
+            if (t) {
+                t.installed = true;
+            };
         } else if (tokens[0] === 'TERRAIN') {
             game.terrains[tokens[1]] = tokens[2]
         } else if (tokens[0] === 'MAP') {
@@ -1061,7 +1066,7 @@ let tui = {
     let term_x = Math.max(0, -this.offset[1]);
     let map_y = Math.max(0, this.offset[0]);
     let map_x = Math.max(0, this.offset[1]);
-    for (; term_y < terminal.rows && map_y < game.map_size[0]; term_y++, map_y++) {
+    for (; term_y < terminal.rows && map_y < this.map_lines.length; term_y++, map_y++) {
         let to_draw = this.map_lines[map_y].slice(map_x, this.window_width + this.offset[1]);
         terminal.write(term_y, term_x, to_draw);
     }
@@ -1355,12 +1360,15 @@ let explorer = {
     get_thing_info: function(t) {
         const symbol = game.thing_types[t.type_];
         let info = t.type_ + " / " + symbol;
-         if (t.thing_char) {
-             info += t.thing_char;
-         };
-         if (t.name_) {
-             info += " (" + t.name_ + ")";
-         }
+        if (t.thing_char) {
+            info += t.thing_char;
+        };
+        if (t.name_) {
+            info += " (" + t.name_ + ")";
+        }
+        if (t.installed) {
+            info += " / installed";
+        }
         return info;
     },
     annotate: function(msg) {