fix #K3656 - chest in pit

Using #loot while in a pit allows looting containers in that pit.
Using open and specifying the hero's spot when not in a pit allows
looting containers at hero's spot.  But using open while in a pit
complained about not being able to reach out of the pit before player
had a chance to give hero's spot at the place of interest, so did not
allow looting any container there.

Get a target spot before rejecting use of 'open' while in a pit.
The alternate prompt might be tty-centric.
This commit is contained in:
PatR
2022-08-07 16:02:44 -07:00
parent b635160297
commit 4e6d3aba4f
3 changed files with 22 additions and 7 deletions

View File

@@ -1336,6 +1336,8 @@ if the game crashed or the process was killed, recovering a save file ended
when using --nethackrc=file on the command line (currently only implemented
for ports that use unixmain.c), options parsing freed the string
containing 'file' before using it as the RC file name
using 'o'pen as a synonym for #loot of a container at the hero's location did
not work if the hero was in a pit
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support