-
Notifications
You must be signed in to change notification settings - Fork 55
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
Item quantity is getting doubled with calling game.itempiles.API.transferItems( #677
Comments
going into line 300 the quantities look okay. |
so, there was 1 tinderbox and 1 container, sourceTransaction.prepare() ends up with 2 items to delete and 2 itemDeltas, the delta for the tinderbox should be -1, but it is -2. |
Can you confirm that the backpack is not in your |
Okay, I think I know what is going on here. In v11, when you dropped a backpack, it just dropped the backpack and left all it's contents in your inventory, I wrote code to handle that. So, it would appear that I no longer need my code. |
Yeah, you basically corrected an issue I had been coding around in v11. |
It is still an issue, it shouldn't duplicate ids. |
Okay, well, the issue is that I was transferring a container and all of its contents. You have added a handler for containers, that adds their contents. This caused the items to be duplicated. |
The reason is that you do a concat of items and newitems. It really needs to be a union. |
(if the item already exists, it wouldn't be added again.) |
I could fix it if you don't have time. |
Just let me know. |
Item Piles is open source, so feel free to create a pull request as you please |
I confirm the following:
Describe the bug
If I have quantity 4 of an item and transfer to an item pile, the quantity ends up being 8 on the vault.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the amounts to be retained.
Setup
Active modules
The text was updated successfully, but these errors were encountered: