home · contact · privacy
Mark thing-carrying players with $ instead of +.
[plomrogue2] / rogue_chat.html
index 573e295874411a5a8ebe319adbddb7472dbd4b1a..0c0cb307c65366d9ff1d6ec0de0c45f55230bf6f 100644 (file)
@@ -488,6 +488,11 @@ let server = {
             tui.mode_take_thing.legal = game.tasks.includes('PICK_UP');
         } else if (tokens[0] === 'THING_TYPE') {
             game.thing_types[tokens[1]] = tokens[2]
+        } else if (tokens[0] === 'THING_CARRYING') {
+            let t = game.get_thing(tokens[1], false);
+            if (t) {
+                t.carrying = true;
+            };
         } else if (tokens[0] === 'TERRAIN') {
             game.terrains[tokens[1]] = tokens[2]
         } else if (tokens[0] === 'MAP') {
@@ -994,6 +999,9 @@ let tui = {
                 if (used_positions.includes(t.position.toString())) {
                     meta_char = '+';
                 };
+                if (t.carrying) {
+                    meta_char = '$';
+                }
                 map_lines_split[t.position[0]][t.position[1]] = symbol + meta_char;
                 used_positions.push(t.position.toString());
             }