+ let terrain_char = game.map[position_i]
+ let terrain_desc = '?'
+ if (game.terrains[terrain_char]) {
+ terrain_desc = game.terrains[terrain_char];
+ };
+ info_to_cache += 'TERRAIN: "' + terrain_char + '" / ' + terrain_desc + "\n";
+ let protection = game.map_control[position_i];
+ if (protection == '.') {
+ protection = 'unprotected';
+ };
+ info_to_cache += 'PROTECTION: ' + protection + '\n';
+ for (let t_id in game.things) {
+ let t = game.things[t_id];
+ if (t.position[0] == this.position[0] && t.position[1] == this.position[1]) {
+ let symbol = game.thing_types[t.type_];
+ let protection = t.protection;
+ if (protection == '.') {
+ protection = 'none';
+ }
+ info_to_cache += "THING: " + t.type_ + " / " + symbol;
+ if (t.thing_char) {
+ info_to_cache += t.thing_char;
+ };
+ if (t.name_) {
+ info_to_cache += " (" + t.name_ + ")";
+ }
+ info_to_cache += " / protection: " + protection + "\n";
+ }
+ }
+ if (this.position in game.portals) {
+ info_to_cache += "PORTAL: " + game.portals[this.position] + "\n";
+ }
+ if (this.position in this.annotations) {
+ info_to_cache += "ANNOTATION: " + this.annotations[this.position];
+ }