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

Add MoveSomewhere inventory action #2808

Closed
wants to merge 1 commit into from
Closed

Conversation

est31
Copy link
Contributor

@est31 est31 commented Jun 20, 2015

Improve shift+click experience. Needed because even if client prediction were perfect, the server can send an "updated" inventory before informations about the actually updated inventory came in, and fast shift-clickers will have swapped slots.
TODO:

  • Get a way to determine the "reduced" count.
  • It doesn't handle infinite inventories well
  • There is a "when you click on item that will be removed because it has already been transmitted to the server, you will 'get' something back from the 'destination stack'" bug.

@est31 est31 force-pushed the movesomewhere branch 3 times, most recently from 764f4d7 to 07bb364 Compare June 23, 2015 02:28
@est31
Copy link
Contributor Author

est31 commented Jun 23, 2015

Ready for review.

for (u32 dest_i = 0; dest_i < dest_size; dest_i++) {
if (!m_items[dest_i].empty()) {
item1 = dest->addItem(dest_i, item1);
if (item1.empty()) break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this condition into the for loop condition, it's more elegant.

Improve shift+click experience
@est31
Copy link
Contributor Author

est31 commented Jun 23, 2015

2c1fd29

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.

None yet

3 participants