-
Notifications
You must be signed in to change notification settings - Fork 155
Right click sell #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Right click sell #255
Conversation
- Implemented logic to support selling items by right-clicking in the inventory when the NPC shop is open. - Added safeguards for high-value items, displaying a confirmation dialog before selling. - Adjusted NPC shop behavior to allow right-click interactions to propagate to the inventory. - Included handling to restore picked items on failed sell attempts.
Summary of ChangesHello @Mosch0512, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience within the game's inventory and NPC shop systems by adding a convenient right-click sell feature. It also includes important preventative measures to avoid accidental item unequipping when interacting with shops and ensures a confirmation step for selling high-value items, making the selling process more intuitive and safer for players. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a quality-of-life feature allowing players to sell items by right-clicking them in their inventory while an NPC shop is open. The implementation is thoughtful, including a safeguard to prevent accidental unequipping of items when the shop is open. The code for handling high-value items with a confirmation dialog is also correctly implemented.
My review identified a critical bug in the item selling logic. There's a scenario where an item could visually disappear from the inventory if an unexpected error occurs, which could be alarming for players. I've provided a code suggestion to fix this by reordering operations to ensure UI consistency and prevent this apparent item loss. Other than this issue, the changes look good and the new feature is a great addition.
Introduced after ai review suggestion
|
Nice feature, but I have the feeling this is a bit risky. Could we add a condition for a pressed key, e.g. 'Ctrl'? |
|
so you mean when holding ctrl and right or left clicken the item in shop only then selling items should be allowed? i mean i dont the the risky part ... maybe you could explain me in short what you think could go wrong. we would have one more complicated option of adding this by acutally extending funcionallity of the games ui |
Adds feature to right click sell items in shops.
Open Question should it even be possible to unequip items in shop? possible accidential sell of non valuable items. we could add an additional check if you realy want to sell the item if it was equiped previously and still allow to unequip items on right click when shop is visible. Note this might be a bit more tricky
closes #252