The pull request that fixed a couple of instances where it was possible to have multiple entries for gold in inventory indirectly pointed out that the error checking was clumsy. If you executed the #adjust command while having two '$' items in inventory, you were told twice that you had multiple stacks of gold in inventory. Change how that's handled so that the warning appears at most once for any given #adjust command. Also avoids having #adjust's use of getobj() re-scan entire invent for every item in invent. Also, if player did manage to get two or more '$' entries, #adjust would allow moving any but the last to a letter entry. Once in a letter, further #adjust with count specified could split the letter gold entries into even more gold entries. Now, if the player picks gold as the #adjust 'from' item (which is only possible when there are wrong letter gold entries or multiple ones or both) then #adjust will now force 'to' slot to be '$' (without asking player to pick). Lastly, the inventory check for multiple and/or wrong slot gold is now performed by wizard mode sanity_check() in addition to #adjust.
116 KiB
116 KiB