Skip to content
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

Fix dupe, doubble click and shift click #577

Closed
wants to merge 0 commits into from
Closed

Conversation

4lve
Copy link
Contributor

@4lve 4lve commented Feb 22, 2025

Description

This PR fixes:

  • Dropping with q or shift q not working
  • Dupe glitch when dropping from inventory
  • Shift clicking
  • Doubble clicking

Testing

Please follow our Coding Guidelines

@Snowiiii
Copy link
Collaborator

Does this fix any issues ?, Maybe #547

@4lve
Copy link
Contributor Author

4lve commented Feb 22, 2025

Yep, it fixes that issue

@Snowiiii
Copy link
Collaborator

I notice that our currently implementation has a bug which disallows the player to interact with an item the first time they open there Inventory. Can you may fix this as well?

@4lve
Copy link
Contributor Author

4lve commented Feb 22, 2025

Ye that's odd, but that was a bug before I think cause even logging all clickevents it won't show the first interaction

@4lve
Copy link
Contributor Author

4lve commented Feb 22, 2025

That issue is caused because the state id is off sync

@4lve
Copy link
Contributor Author

4lve commented Feb 22, 2025

I fixed so it works first try now, and I also added partial support for equipping armor with shift clicking

@Snowiiii
Copy link
Collaborator

Nice, It fixed now. Great job @4lve. So i have one last bug i would love to have fixed 😅. Maybe you noticed that when you begin to drag an item in inventory and then close the inventory while having the stack dragged, it is not reseted but still being dragged when open the inventory the next time

@4lve
Copy link
Contributor Author

4lve commented Feb 23, 2025

@Snowiiii Thx, I could maybe fix that in another PR

@kralverde
Copy link
Contributor

Hey @4lve I made a review, should be good to merge after. The item dragging can be another PR. Could you help me understand what the state_id does? At the end there was something weird with state_id -= 2 and stuff.

@4lve
Copy link
Contributor Author

4lve commented Feb 23, 2025

Idk, I just found that the state id decreases by 2 after closing a container. Found it by trail and error

@kralverde
Copy link
Contributor

I broke something...

@kralverde
Copy link
Contributor

kralverde commented Feb 25, 2025

Sorry @4lve I tried to push to your PR but something got messed up. Could you merge my PR to your fork and then re-open the PR? Your authorship should be retained. Thanks for working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shift clicking items doesn't move actually move items around in your inventory.
3 participants