- if (this.map_mode == 'protections') {
- line.push(game.map_control[i] + ' ');
- } else {
- line.push(game.map[i] + ' ');
- }
- };
- map_lines_split.push(line);
- if (this.map_mode == 'terrain + annotations') {
- for (const coordinate of explorer.info_hints) {
- map_lines_split[coordinate[0]][coordinate[1]] = 'A ';
+ map_lines_split.push(line);
+ if (this.map_mode == 'terrain + annotations') {
+ for (const coordinate of explorer.info_hints) {
+ map_lines_split[coordinate[0]][coordinate[1]] = 'A ';
+ }
+ } else if (this.map_mode == 'terrain + things') {
+ for (const p in game.portals) {
+ let coordinate = p.split(',')
+ let original = map_lines_split[coordinate[0]][coordinate[1]];
+ map_lines_split[coordinate[0]][coordinate[1]] = original[0] + 'P';
+ }
+ let used_positions = [];
+ for (const thing_id in game.things) {
+ let t = game.things[thing_id];
+ let symbol = game.thing_types[t.type_];
+ let meta_char = ' ';
+ if (t.thing_char) {
+ meta_char = t.thing_char;
+ }
+ if (used_positions.includes(t.position.toString())) {
+ meta_char = '+';
+ };
+ map_lines_split[t.position[0]][t.position[1]] = symbol + meta_char;
+ used_positions.push(t.position.toString());
+ };