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

@@ -476,6 +476,11 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */
#define SUPPRESS_HISTORY 4
#define URGENT_MESSAGE 8
/* get_count flags */
#define GC_NOFLAGS 0
#define GC_SAVEHIST 1 /* save "Count: 123" in message history */
#define GC_ECHOFIRST 2 /* echo "Count: 1" even when there's only one digit */
/* rloc() flags */
#define RLOC_NONE 0x00
#define RLOC_ERR 0x01 /* allow impossible() if no rloc */