Found this bug in my server, where, in case you had 1 slot with an amount under the total amount to remove, (for example, 1 in slot1 and 4 in slot 4, try to remove 5), it would return true but not remove anything. This fixes it by removing the first slot and continuing without updating the inventory. This way, if the total amount in all slots is under the amount to remove, it would not finish removing and simply return false.
Pull Request Checklist:
[x] Have you followed the guidelines in our contributing document and Code of Conduct?
[X] Have you checked to ensure there aren't other open for the same update/change?
[X] Have you built and tested the resource in-game after the relevant change?
Found this bug in my server, where, in case you had 1 slot with an amount under the total amount to remove, (for example, 1 in slot1 and 4 in slot 4, try to remove 5), it would return true but not remove anything. This fixes it by removing the first slot and continuing without updating the inventory. This way, if the total amount in all slots is under the amount to remove, it would not finish removing and simply return false.
Pull Request Checklist:
resource
in-game after the relevant change?