[ChestsAnywhere] Feature: Auto item sorting from anywhere #1016
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a new optional feature that allows the player to automatically sort all items from their inventory into chests from anywhere.
How it works
Basically, we look into the player inventory and for each item, we try to find a chest that have a similar item stored. For now, I think that this feature only make sense to store items into chests, but this could be easily configurable.
After looking for a chest, we check the item stacks in order to try to store the item, the conditions to store an item are the following:
By the end of the process, we show a simple message to the player using
Game1.addHUDMessage
to any item was sorted or not.How it would be shipped
This feature could be quite "op", so it's shipped as disabled by default.
The player can also change the range of the item sorter, as well as the key to sort the items if they so desire.
Regarding translations
As I only speak Portuguese and English, I only did the translations for those languages, so any help with the other languages would be great!
Final words
That's my first time trying to add a feature to a mod, so any feedback is welcome :P