home · contact · privacy
Add terrain info.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 1 Nov 2020 03:31:53 +0000 (04:31 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 1 Nov 2020 03:31:53 +0000 (04:31 +0100)
new2/rogue_chat_nocanvas_monochrome.html

index 37930ce44ceeee0b03f7b7afa0829f24e21f6253..a4aa85deddf6059fc362303531ee3a7400773969 100644 (file)
@@ -528,12 +528,14 @@ let explorer = {
     },
     get_info: function() {
         let info = "";
+        let position_i = this.position[0] * game.map_size[1] + this.position[1];
+        info += "TERRAIN: " + game.map[position_i] + "\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]) {
-                 info += "PLAYER";
+                 info += "PLAYER @";
                  if (t.name_) {
-                     info += " " + t.name_;
+                     info += ": " + t.name_;
                  }
                  info += "\n";
              }