Skip to content

Fix Item Requisition occasionally deleting items#317

Open
JoshieGemFinder wants to merge 1 commit intoDaedalusGame:rekindledfrom
JoshieGemFinder:patch-1
Open

Fix Item Requisition occasionally deleting items#317
JoshieGemFinder wants to merge 1 commit intoDaedalusGame:rekindledfrom
JoshieGemFinder:patch-1

Conversation

@JoshieGemFinder
Copy link

canItemStacksStack() will return false if the first stack is empty. This means if you try to insert an unstackable item into a non-smart requisition connected to a full container, it'll:

  1. Shrink that first stack to being empty.
  2. Fail to insert the split stack into the container.
  3. Try to merge the first stack and the split stack.
  4. Get false from canItemStacksStack() because the first stack is empty
  5. Return the empty stack because of the return first, deleting the item you're trying to insert

`canItemStacksStack()` will return false if the first stack is empty. This means if you try to insert an unstackable item into a non-smart requisition connected to a full container, it'll:  
1. Shrink that first stack to being empty.  
2. Fail to insert the split stack into the container.  
3. Try to merge the first stack and the split stack.
4. Get `false` from `canItemStacksStack()` because the first stack is empty  
5. Return the empty stack because of the `return first`, deleting the item you're trying to insert
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.

1 participant