- this.log_msg("selectable things:");
- const player = game.things[game.player_id];
- let selectables = [];
- for (const t_id in game.things) {
- const t = game.things[t_id];
- if (t.position[0] == player.position[0]
- && t.position[1] == player.position[1]
- && t != player && t.type_ != 'Player') {
- selectables.push([t_id, t]);
+ this.log_msg("Portable things in reach for pick-up:");
+ const y = game.player.position[0]
+ const x = game.player.position[1]
+ let directed_moves = {
+ 'HERE': [0, 0], 'LEFT': [0, -1], 'RIGHT': [0, 1]
+ }
+ if (game.map_geometry == 'Square') {
+ directed_moves['UP'] = [-1, 0];
+ directed_moves['DOWN'] = [1, 0];
+ } else if (game.map_geometry == 'Hex') {
+ if (y % 2) {
+ directed_moves['UPLEFT'] = [-1, 0];
+ directed_moves['UPRIGHT'] = [-1, 1];
+ directed_moves['DOWNLEFT'] = [1, 0];
+ directed_moves['DOWNRIGHT'] = [1, 1];
+ } else {
+ directed_moves['UPLEFT'] = [-1, -1];
+ directed_moves['UPRIGHT'] = [-1, 0];
+ directed_moves['DOWNLEFT'] = [1, -1];
+ directed_moves['DOWNRIGHT'] = [1, 0];