item-action 'I' - use #adjust to split a stack

More context-sensitive inventory support.  While examining inventory,
if you pick an item other than gold and it has a quantity of more
than 1, "I - Adjust inventory by splitting this stack" will be one
of the menu choices.

Breaking doorganize() into two parts was much easier than expected,
but the new internal command added to be an alternate for the first
part had more niggling details than anticipated.

Message history only shows the first digit with "Split off how many?"
if the player enters more than that.
This commit is contained in:
PatR
2022-04-20 13:38:09 -07:00
parent 627fa5efad
commit a9a9d19038
5 changed files with 120 additions and 36 deletions

View File

@@ -702,9 +702,11 @@ curses_get_count(int first_digit)
curses's message window will display that in count window instead */
current_char = get_count(NULL, (char) first_digit,
/* 0L => no limit on value unless it wraps
* to negative;
* FALSE => suppress from message history */
0L, &current_count, FALSE);
to negative */
0L, &current_count,
/* default: don't put into message history,
don't echo until second digit entered */
GC_NOFLAGS);
ungetch(current_char);
if (current_char == '\033') { /* Cancelled with escape */