X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;ds=sidebyside;f=rogue_chat.html;h=ef87c0f5888b8b449680cd22357bd1c5865da2fe;hb=61fa10d0738452a5f0e62fd33d48eabcfa46b7c3;hp=d4cedc2d9fca7cfbbd69d4e0e485198d5636096a;hpb=7ae8ee09d721a1206432acd0a22a23885edcbea0;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index d4cedc2..ef87c0f 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -929,8 +929,7 @@ let tui = { 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]; + function draw_thing(t, used_positions) { let symbol = game.thing_types[t.type_]; let meta_char = ' '; if (t.thing_char) { @@ -941,6 +940,18 @@ let tui = { }; map_lines_split[t.position[0]][t.position[1]] = symbol + meta_char; used_positions.push(t.position.toString()); + } + for (const thing_id in game.things) { + let t = game.things[thing_id]; + if (t.type_ != 'Player') { + draw_thing(t, used_positions); + } + }; + for (const thing_id in game.things) { + let t = game.things[thing_id]; + if (t.type_ == 'Player') { + draw_thing(t, used_positions); + } }; } let player = game.things[game.player_id];