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 orphaned storage grid pieces getting stuck to the cursor #27960

Merged

Conversation

EmoGarbage404
Copy link
Member

About the PR

Closes #27918

Sometimes, when you click, the drag begins but the storage pieces are immediately rebuilt, causing the one you are dragging to enter a state of zen as it casually deparents and can no longer be clicked on. This results in the OnKeyBindUp never getting called due to the control being in an invalid state so you can never end the dragging.

to fix this, we simply check when rebuilding the storage pieces to make sure that we aren't accidentally getting rid of the piece we are dragging. We just add it back into its spot and let the rest of the UI update as it needs to.

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

🆑

  • fix: Fixed a bug that would cause items in your inventory to get stuck to your cursor.

@ShadowCommander
Copy link
Member

How often does the UI get regenerated? If it's multiple times in a second, can you make it not regenerate UI elements unless it gets removed or added?

@EmoGarbage404
Copy link
Member Author

How often does the UI get regenerated? If it's multiple times in a second, can you make it not regenerate UI elements unless it gets removed or added?

the UI is only getting regenerated when a piece is moved. It's far from every second a lot of the time.

@ShadowCommander ShadowCommander merged commit 868b6c2 into space-wizards:master May 17, 2024
12 checks passed
rbertoche pushed a commit to rbertoche/space-station-14 that referenced this pull request May 18, 2024
…izards#27960) (space-wizards#1378)

* fix orphaned storage grid pieces getting stuck to the cursor

* instead of denying it, update it smartly

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
Titian3 pushed a commit to Titian3/space-station-14 that referenced this pull request May 24, 2024
…izards#27960)

* fix orphaned storage grid pieces getting stuck to the cursor

* instead of denying it, update it smartly
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.

Items from your bag sometimes get stuck on your cursor
2 participants