Change special keys into extended commands

Changes most of the special keys used in the main input loop
into extended commands:

- movement keys are now bound to extended commands, eg.
  #movewest and so on.

- m-prefix is now #reqmenu extended command, still bound to
  the 'm' key.

- run, rush, and fight are now extended commands, still bound
  to the same keys as previously.

- nopickup and runnopickup keys are removed.
  Nopickup was using 'm' key, the same as the m-prefix, so
  allow #reqmenu to modify movement commands to disable pickup.

- multiple prefix commands are allowed. This lets user to
  use #reqmenu, followed by #run, followed by movement to simulate
  runnopickup behaviour. (If necessary, adding runnopickup back
  as an extended command would be easy)
This commit is contained in:
Pasi Kallinen
2022-01-16 01:22:17 +02:00
parent dd28139a9e
commit e7fa065203
10 changed files with 591 additions and 502 deletions

View File

@@ -987,13 +987,8 @@ use_pick_axe(struct obj *obj)
downok = !!can_reach_floor(FALSE);
dsp = dirsyms;
for (dir = 0; dir < N_DIRS_Z; dir++) {
char dirch;
if (dir == DIR_DOWN)
dirch = cmd_from_func(dodown);
else if (dir == DIR_UP)
dirch = cmd_from_func(doup);
else
dirch = g.Cmd.move[dir];
char dirch = cmd_from_dir(dir, MV_WALK);
/* filter out useless directions */
if (u.uswallow) {
; /* all directions are viable when swallowed */