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

@@ -288,7 +288,8 @@ extern int getdir(const char *);
extern void confdir(boolean);
extern const char *directionname(int);
extern int isok(coordxy, coordxy);
extern int get_adjacent_loc(const char *, const char *, coordxy, coordxy, coord *);
extern int get_adjacent_loc(const char *, const char *, coordxy, coordxy,
coord *);
extern const char *click_to_cmd(coordxy, coordxy, int);
extern char get_count(const char *, char, long, cmdcount_nht *, unsigned);
#ifdef HANGUPHANDLING