Make alch + kitten-buying handle full inventories better if possible
What has been done in this MR?
- Make it possible to alch stuff when your inventory is full with non-coin items, if the alch would free up the necessary space (i.e. you're alching an item of which you only have one unit)
- Make it possible to receive a kitten from Gertrude when your inventory is full, but if the transaction would free the space for the kitten (i.e. you are carrying exactly 100 gp)
- Make it possible to receive a kitten from Gertrude when your inventory is full even with more than 100 gp, but you don't have a familiar out, meaning the pet can be summoned immediately
- Also port that bit over to the Gertrude's Quest completion code - you will now not lose the kitten if you have a full inventory while NOT having a familiar out
- Fix a bug where Gertrude's kitten-giving dialogue will hang if you talk to her while having a non-pet familiar out
- Spotted some typographical things (missing commas, "OK" spelled as "ok") in Gertrude's dialogue, which I fixed as well
Known preexisting issue: if you complete Gertrude's Quest with a full inventory AND a pet/familiar out, the kitten you were supposed to get is lost. I don't know what the authentic fix for that is - should I implement addItemOrBank
or something? Or is losing it actually the authentic consequence?
What should testers check?
- You can alch stuff when your inventory is full and there is no space, but the alch will free up a spot
- You can alch stuff when your inventory is full and there is space because one of the items is coins
- You can't alch stuff if your inventory is full and does not contain coins and the alch would not free up a spot (e.g. you're alching stackable items of which you have more than 1)
- The Alchemists' Playground continues to work normally
- Stuff that relies on alch listeners continues to work normally
- You can get a kitten from Gertrude (both by asking and by completing her quest) even when your inventory is full as long as you don't have a familiar/pet out
- Said kitten functions normally - in particular, it can be picked up and dropped and it will still be the same kitten (i.e. with the same hunger and growth as it had when you picked it up)
- If you have a familiar/pet out, Gertrude will not hand you out a kitten with a message that your inventory is full. Please specifically test the familiar case, because this used to just hang.
- If you have exactly 100 gp, Gertrude does sell you the kitten even in the above case.
- But not if you have 101 gp.
- Nor if you're broke.
-
I have tested these changes thoroughly. -
I used the relevant Thanos/Zaros tool for any JSON edits where possible, and have attached screenshots of any changes.