FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.73k stars 403 forks source link

Fix Cabinet Sorting Bug #13402 #13938

Closed egunde closed 4 months ago

egunde commented 4 months ago

Fixed an issue where stacks of the same item in a cabinet would be rearranged when sorting alphabetically.

Added a function IsContainer to return whether or not an Item is an ItemContainer.

Also modified sorting to ignore any ItemContainer. Not sure if this is the ideal solution, but it was easier than figuring out a way to break ties between similar containers.

Edit: This is my first time contributing to something open source, so if I'm doing something wrong, feedback is appreciated.

Regalis11 commented 4 months ago

Thank you for the contribution! We've actually got a fix pending for this in our private repo, it's just waiting to be tested internally, so I'll close the PR.