Jump to content

Weird ItemTile widget behavior


Recommended Posts

Hi! I'm the author of the new mod True Stack Size which goal is to improve UI for inventory slots that go above 999. @Maxil20 reported (and it is indeed the case) that quantities that go above 4096 behave weird. When debugging, I've discovered that ItemTile:SetQuantity gets called with 4096 instead of the real value for some unknown reason.

  • on a server with caves it gets called twice when you overflow 4096: first time with the real value, second time with 4096. After that it gets weirder. If you add N items on top of the previous X (X > 4096), it again gets called twice: with 4096 + N (not X + N) and then again with 4096. Similarly if you remove N items from the pile X (X > 4096 + N), it gets called first with 4096 - N (not X - N) and then with 4096
  • on a server without caves it gets called with the real value, but whenever you close and open the chest back up, it gets called with 4096 (one time). When you change the quantity after that it gets fixed until you close the chest again

Could you please look at this odd behavior and see if it could be fixed?

  • Like 3
Link to comment
Share on other sites

Huh, so that’s why it seemed to be causing issues. Thank you for looking into it, I would appreciate if this was adjusted, since with the infinite stack chests its completely possible to get stacks that are much bigger than 4096.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...