Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for max number of tile items when moving in sorting #37258

Merged
merged 1 commit into from Jan 20, 2020
Merged

Check for max number of tile items when moving in sorting #37258

merged 1 commit into from Jan 20, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 20, 2020

Summary

SUMMARY: Bugfixes "Check for max number of tile items when moving in sorting"

Purpose of change

Fixes #35398

Describe the solution

So I couldnt actually reproduce the infinite looping issue in the linked issue, the activity just dumped the items on the tile next to the target tile that had 4096 items in it.
But this uncovered another problem - if the entire area was covered in unsorted zones, then when it overflowed, it tried to sort it again, and when it did, the item just disappeared, gone.

This fix stops that happening, and also should stop any occurence of infinite looping as per the linked issue, even though I couldnt get that to trigger.
Basically it checks if the number of items on that tile is more than MAX_ITEM_IN_SQUARE and if it is, it bails out.

Describe alternatives you've considered

N/A

Testing

Put 4096 cig butts down on a tile that was a spare parts and other loot zone, put unsorted loot zone around it in a 10x10 square.
Placed scrap metals everywhere in the unsorted zones, pressed shit+o - sort.
It didnt do anything, because the target tile had reached max items.

Additional context

N/A

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones labels Jan 20, 2020
@ZhilkinSerg ZhilkinSerg merged commit 038f70f into CleverRaven:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

About the actual limit of 4096 items per tile
1 participant