Adjust research cost source
Allows costs to be paid from items in the university hut block. Prioritizes the university hut block before the player inventory. Ignores enchanted items or items with custom name tags.
Closes #10954 Closes Discussion at Plea for an Accessibility Feature
Changes proposed in this pull request
- Allows research costs to be paid from the university hut block inventory.
- Prioritizes items in the university hut block over those in a player inventory.
- Ignores items with enchantments or custom name tags.
- If a "garbage" enchanted item is desired for use in research, it can be placed in a grindstone to strip it down to the enchanted version.
Testing
- [X] Yes I tested this before submitting it. -- Test cost paid only from hut block. -- Test cost paid only from player inventory. -- Test cost paid split across inventories. -- Test skipping enchanted item.
- [ ] I also did a multiplayer test.
Review please
Garbage items are often cursed or otherwise unable to be "normalized"... I'd request that portion not be done please (at least for the hutblock content portion)
Aye, I'd skip that ignore and have it take whatever is in the hutblock. Would be a good way to offload some junk items if they have weird enchantments,. Really the only change here would be to require the research to take from the hut inventory instead of player inventory. You still have to go queue the research, just not have to carry things back and forth and risk an oops.
I'm totally open to that - I'd love to have one core dev opinion on that before I make the change, though, since I know it was received with great "meh" when I suggested it in chat. ;)
edit - for clarity, loose match in the university hut block, strict match on player inventory. Chance of loss of special item then requires a user error, explicitly... Low risk.
I think we should add a Chest icon to the building's research UI (where the 3 branches are listed below is space) which has a hover tooltip explaining that you can put items in there to start research
I think we should add a Chest icon to the building's research UI (where the 3 branches are listed below is space) which has a hover tooltip explaining that you can put items in there to start research
Yes, that's probably a good idea.
I think we should add a Chest icon to the building's research UI (where the 3 branches are listed below is space) which has a hover tooltip explaining that you can put items in there to start research
Yes, that's probably a good idea.
I've also made the chest clickable to open the inventory itself, for convenience.
I'd center it and make it much bigger^^
I'd center it and make it much bigger^^
Ok, I incorporated all the code review feedback. It grew a bit in terms of code touched. I re-tested all the client paths that touched the BuildingView.getContainerList (now BuildingView.getContainers) as well as the scenarios described in the PR, the fact that enchanted items will be taken from the building inventory to pay research costs but NOT the player inventory.