Skip to content

Fix "invxf2" transfers leaving behind 1 item per stack#142

Open
Listerw wants to merge 1 commit intoEnderWiggin:masterfrom
Listerw:patch-1
Open

Fix "invxf2" transfers leaving behind 1 item per stack#142
Listerw wants to merge 1 commit intoEnderWiggin:masterfrom
Listerw:patch-1

Conversation

@Listerw
Copy link

@Listerw Listerw commented Nov 26, 2024

Steps to reproduce:

  1. open a stockpile
  2. take out a stack of 2 or more items
  3. open extra info panel and set group to type
  4. alt+shift+l click on the extra info panel's item to transfer all

Results:
1 item will be left behind from the stack. This is likely due to transferring 1 item at a time, leading to a new id being created once there is only one item left in the stack, and so the previous id for that remaining item is no longer valid.

This fixes it by sending the stack size when transferring each item. It only needs to be done once per item in the stack, but I couldn't see an easy way to do it. E.g. see Cediner/ArdClient#104

I've tested this by building locally and transferring stacks of different sizes + an unstacked item using the extra info panel into a stockpile.

@EnderWiggin
Copy link
Owner

Does this work when transferring ore to the smelter?

@Listerw
Copy link
Author

Listerw commented Dec 2, 2024

It works with transferring ore to the ore smelter. Trying with black coal, it's unchanged and still does nothing with this type of click when an ore smelter is open.

If you are looking for cases where this doesn't work: having multiple target ExtInventory can still result in this issue. E.g. if you have 2 drying racks open and had a stack of 5 in your inventory, 4 will go to the first rack, then the item slot will become the unstacked version with a new id still.

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.

2 participants