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

Now partial sorting will skip first slots instead of last #10

Merged
merged 3 commits into from Jul 15, 2017

Conversation

AqlaSolutions
Copy link
Contributor

@AqlaSolutions AqlaSolutions commented Jul 13, 2017

I find it much better to skip sorting of a first line of inventory instead of a last because when I pick an item from there (click) and release (Q) it's returned to the same position (if there are no gaps gaps). With previous (last line) approach it would be returned to a first empty slot which is usually outside of "unsorted" area.

Please review the changes because I'm not sure about the line "local i_slots = {i = sort_start - 1, current = sort_start, next = sort_start + 1, filters = filters}"

AqlaSolutions and others added 2 commits July 13, 2017 23:46
I find it much better to skip just first line of inventory instead of the last because when I pick an item from there (click) and release (Q) it's returned to the same position (if there are no gaps gaps). With previous (last line) approach it would be returned to a first empty slot which is usually outside of "unsorted" area.

Please review the changes because I'm not sure about the line "local i_slots = {i = sort_start - 1, current = sort_start, next = sort_start + 1, filters = filters}"
@theRustyKnife
Copy link
Owner

theRustyKnife commented Jul 14, 2017

I don't personally use the part inventory sorting a whole lot, but your idea seems right.

You understood the code correctly... I think at least :P It's such a mess that it took me a good while to figure out what was happening there - And I wrote it...

I also changed things around a bit in an attempt to clean up the code a little and added support for player setting, so you can choose what type of sorting you want to use. I'll implement the setting along with some locale rewording tomorrow.

Cheers TRK

@theRustyKnife theRustyKnife merged commit 2aaadf8 into theRustyKnife:master Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants