If a shop owner accidentally leaves an item in the first inventory slot of a shop turtle, and somebody attempts to purchase from the shop, the turtle will dispense the item which was already in its inventory rather than give a refund.
I have a few thoughts here
- maybe try to import the turtle inventory into storage before any purchase
- maybe also validate the count of items pulled into the turtle inventory
- also validate the item with
turtle.getItemDetail right before it gets dropped
If a shop owner accidentally leaves an item in the first inventory slot of a shop turtle, and somebody attempts to purchase from the shop, the turtle will dispense the item which was already in its inventory rather than give a refund.
I have a few thoughts here
turtle.getItemDetailright before it gets dropped