X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance?a=blobdiff_plain;f=rogue_chat.html;h=f7a97ec11325cebb6faf66a769209fceea5aae0e;hb=d13e2f639316c1dba7a62d84f3c850bc937c2b1e;hp=f0f2faa1213ac1786ca59eaaafeb4f4eac9467e9;hpb=2bc91772ca3d5056eb5a252869d8dff33c586da5;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index f0f2faa..f7a97ec 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -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) {