Closed earthiverse closed 6 months ago
When you refactor the code too, it usually requires a deeper review as it might introduce loopholes. Did you review your code from this perspective? If you're confident I'll merge
Did you review your code from this perspective?
I tested it locally in Docker and it looks good to me.
First split was trying to split a cring (failed -> OK)
Second split was trying to split a stack of 80 potions with a quantity of 160 (this is a small optimization, we're now checking quantity requested >= quantity available
instead of quantity requested == quantity available
), it just returns the original stack position
Third split was splitting 1 potion off that 80 stack, which also was OK
Changes:
to
,from
, andq
to thegame_response
forsplit
from
is the slot the item was split fromto
is the slot that has the quantity the user requested to be splitq
is the count of the items in the new slot