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

@@ -1245,6 +1245,11 @@ To really switch to explore mode, respond with \f(CRy\fP.
You can set the
.op paranoid_confirmation:quit
option to require a response of \f(CRyes\fP instead.
.lp "#fight "
Prefix key to force fight a direction, even if you see nothing
to fight there.
Default key is \(oqF\(cq, or \(oq\-\(cq with
.op number_pad
.lp "#fire "
Fire ammunition from quiver, possibly autowielding a launcher,
or hit with a wielded polearm.
@@ -1439,6 +1444,10 @@ is on.
.lp "#remove "
Remove an accessory (ring, amulet, etc).
Default key is \(oqR\(cq.
.lp "#reqmenu "
Prefix key to modify the behaviour or request menu from some commands.
Prevents autopickup when used with movement commands.
Default key is \(oqm\(cq.
.lp "#retravel"
Travel to a previously selected travel destination.
Default key is \(oqC-_\(cq.
@@ -1451,6 +1460,24 @@ Default key is \(oqM-R\(cq.
Rub a lamp or a stone.
Autocompletes.
Default key is \(oqM-r\(cq.
.lp "#run "
Prefix key to run towards a direction.
Default key is \(oqG\(cq when
.op number_pad
is off,
\(oq5\(cq when
.op number_pad
is set to 1 or 3,
otherwise \(oqM-5\(cq when it is set to 2 or 4.
.lp "#rush "
Prefix key to rush towards a direction.
Default is \(oqg\(cq when
.op number_pad
is off,
\(oqM-5\(cq when
.op number_pad
is set to 1 or 3,
otherwise \(oq5\(cq when it is set to 2 or 4.
.lp "#save "
Save the game and exit the program.
Default key is \(oqS\(cq.
@@ -4775,15 +4802,6 @@ With
.op number_pad
only.
Default is \(oqn\(cq.
.lp fight
Prefix key to force fight a direction.
Default is \(oqF\(cq.
.lp fight.numpad
Prefix key to force fight a direction.
With
.op number_pad
only.
Default is \(oq\-\(cq.
.lp getdir.help
When asked for a direction, the key to show the help.
Default is \(oq?\(cq.
@@ -4874,49 +4892,9 @@ Default is \(oqz\(cq.
.lp getpos.valid.prev
When asked for a location, the key to go to previous closest valid location.
Default is \(oqZ\(cq.
.lp nopickup
Prefix key to move without picking up items.
Default is \(oqm\(cq.
.lp redraw
Key to redraw the screen.
Default is \(oq\(haR\(cq.
.lp redraw.numpad
Key to redraw the screen.
With
.op number_pad
only.
Default is \(oq\(haL\(cq.
.lp repeat
Key to repeat previous command.
Default is \(oq\(haA\(cq.
.lp reqmenu
Prefix key to request menu from some commands.
Default is \(oqm\(cq.
.lp run
Prefix key to run towards a direction.
Default is \(oqG\(cq.
.lp run.nopickup
Prefix key to run towards a direction without picking up items on the way.
Default is \(oqM\(cq.
.lp run.numpad
Prefix key to run towards a direction.
With
.op number_pad
only.
.lp ""
Default is \(oq5\(cq when number_pad is set to 1 or 3,
otherwise \(oqM-5\(cq when it is set to 2 or 4.
.lp rush
Prefix key to rush towards a direction.
Default is \(oqg\(cq.
.lp rush.numpad
Prefix key to rush towards a direction.
With
.op number_pad
only.
.lp ""
Default is \(oqM-5\(cq when number_pad is set to 1 or 3,
otherwise \(oq5\(cq when it is set to 2 or 4.
.hn 2
Configuring Message Types
.pg