more #adjust: '$' and '#' handling

The recent fix to prevent #adjust from letting the player move things
into slot '-' (if compactify() reduced any sequence of consecutive
letters to x-y, introducing dash into the string of characters that
could be chosen from) was triggering a complaint about mixing &&
and || without parentheses.  Fixing that was trivial, but I ended up
making a much more substantial change.

If the '#' overflow slot is in use, you can move something into it
even when you no longer have all 52 regular slots in use.  (When it
isn't already in use, you can't access it.  Previously you could swap
from '#' to any letter but not vice versa.)  If you manage to get
gold in multiple slots or in some slot other than '$', you can move
or merge it into the '$' slot.  And when that situation isn't present
(if even possible--I had to force it with a debugger to test), then
gold will no longer be listed among the inventory letters to adjust.
(That became an issue when GOLDINV came into use, but either nobody
ever noticed or at least never reported.  "Adjust what? [$abd]",
then pick '$' and be told you can't adjust gold.  Prior to GOLDINV,
'$' wasn't included in the list of candidates.)
This commit is contained in:
PatR
2017-10-21 16:02:48 -07:00
parent 08a3297f64
commit a8fb18d6fe
2 changed files with 58 additions and 23 deletions
+2
View File
@@ -460,6 +460,8 @@ hero could cast spells while poly'd into a form which can't speak (or grunt,&c)
when poly'd into a giant and moving onto a boulder's spot, you could get "you
try to move the boulder, but in vain", "however, you can easily pick
it up", "you are carrying too much stuff to pick up another boulder"
improve #adjust command's handling of the '$' and '#' inventory slots
prevent #adjust from allowing anything to be moved into the special '-' slot
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository