- let player_position = [0,0];
- for (const thing_id in game.things) {
- if (game.player_id == thing_id) {
- let t = game.things[thing_id];
- player_position = t;
- }
- }
- if (player_position in game.portals) {
- tui.teleport_target = game.portals[player_position];
+ let t = game.get_thing(game.player_id);
+ if (t.position in game.portals) {
+ tui.teleport_target = game.portals[t.position];