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

Arsenal - Add Sorting Algorithms #7719

Merged
merged 18 commits into from
Aug 18, 2020
Merged

Conversation

BrettMayson
Copy link
Member

@BrettMayson BrettMayson commented May 21, 2020

When merged this pull request will:

  • Allow per tab sorting
    • Left Tab
    • Right Tab
    • Right Tab but actually Left Tab
  • Allow mission makers / other mods to add sorting algorithms
  • Allow ASC / DESC sorting (not sure where to put a button for this in the UI yet)
  • Improve alphabetical sort

Theoretically this could support multiple sorting algorithms at once. Ex. Sort by fire rate, then sort by weight, then alphabetically. I can't think of a nice way to implement that on the UI side. It will however still sub sort alphabetically, Ex. Sort by fire rate, sort weapons with the same fire rate alphabetically.

Images Old Alphabetical Sort
Notice how the AK-15 is separated from it's variants by the GL version.

image

New Alphabetical Sort
image

@BrettMayson BrettMayson changed the title support per tab sorting, and external algorithms ACE Arsenal - Sorting Algorithms May 21, 2020
@jonpas jonpas added kind/feature Release Notes: **ADDED:** status/WIP labels May 21, 2020
@BrettMayson BrettMayson marked this pull request as ready for review May 26, 2020 00:30
@commy2
Copy link
Contributor

commy2 commented May 26, 2020

The classnames shouldn't have used parentheses.

@BrettMayson
Copy link
Member Author

Where?

@BrettMayson
Copy link
Member Author

@jonpas WIP can be removed, this is ready for review

@BrettMayson
Copy link
Member Author

yeah ready for review now, not WIP

addons/arsenal/functions/fnc_sortPanel.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_sortPanel.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_sortPanel.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_sortPanel.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_sortStatement_accuracy.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_addSort.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_addSort.sqf Show resolved Hide resolved
addons/arsenal/functions/fnc_addSort.sqf Outdated Show resolved Hide resolved
addons/arsenal/functions/fnc_addSort.sqf Outdated Show resolved Hide resolved
@@ -0,0 +1,64 @@
class GVAR(sorts) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the scope entry and as a result the sortBase class necessary? I think its reasonable to have all sorting algorithms defined here be public.

Also, fix spaces after commas in this file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to add properties in the future this class would be useful, it also keeps it inline with the rest of arsenal

Brett and others added 2 commits May 31, 2020 02:11
Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
@BrettMayson
Copy link
Member Author

BrettMayson commented Jun 17, 2020

Ready for another review. Found a bug

There is still some areas that can be cleaned up, including the magic numbers.
This PR is consistent with the existing arsenal code. I would rather follow up this PR with a general cleanup of arsenal.

@BrettMayson
Copy link
Member Author

Ready for review, WIP can be removed

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
@PabstMirror PabstMirror added this to the 3.13.4 milestone Jul 23, 2020
@PabstMirror PabstMirror changed the title ACE Arsenal - Sorting Algorithms Arsenal - Add Sorting Algorithms Aug 18, 2020
@PabstMirror PabstMirror merged commit d72555a into acemod:master Aug 18, 2020
@BrettMayson BrettMayson deleted the arsenal_sorting branch August 19, 2020 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants