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

add additional filters to advance search #4131

Merged
merged 62 commits into from
Feb 15, 2023

Conversation

kuronekochomusuke
Copy link
Collaborator

@kuronekochomusuke kuronekochomusuke commented Jan 23, 2023

Add a Combat Unit - Advance Search
Create Random Army - Advance Search

  • add filter on entity type include / exclude
  • add filter on Quirks include (And / OR) / exclude (And / OR)
  • add filter on Weapon Quirks include (And / OR) / exclude (And / OR)
  • add filter on Omni - Any, Yes, No
  • add filter on Official - Any, Yes, No (MUL id != -1)
  • add filter on Tonnage
  • add filter on BV
  • add filter on engine type
  • add filter on clan engine
  • add filter on source
  • add filter on Transports
  • add filter on Canon
  • add filter on Unit Role
  • add filter on Military
  • add filter on Tank Turrets
  • add filter on Lower Arms
  • add filter on Hands
  • add clear tab button - clears filters on current tab

image
image
image
image
image
image

  • add unit count

image

  • add out of
  • add bv total

image

fixes #429
fixes #1380
fixes #2059
fixes #3216
fixes #1994

@HammerGS
Copy link
Member

This is fantastic! Would there be any chance you could look into Engine Type, Quirks, and roles. I know the space in the dialog is really limited.

@kuronekochomusuke kuronekochomusuke marked this pull request as draft January 23, 2023 15:23
@kuronekochomusuke kuronekochomusuke added (RFE) Enhancement Requests for Enhancement, new features or implementations GUI User Interface Advanced Search RFE's related to improving the advanced search. labels Jan 23, 2023
@kuronekochomusuke
Copy link
Collaborator Author

do you know if there are any units that are ETYPE_ARMLESS_MECH, ETYPE_FIGHTER_SQUADRON, ETYPE_TELEMISSILE type? if so what year. i could not find any those to test , so did not include them.

@kuronekochomusuke
Copy link
Collaborator Author

would the unit role go on the Alpha Strike tab?

@HammerGS
Copy link
Member

do you know if there are any units that are ETYPE_ARMLESS_MECH, ETYPE_FIGHTER_SQUADRON, ETYPE_TELEMISSILE type? if so what year. i could not find any those to test , so did not include them.

None that I can think off. Squadrons and Telemissile would be something generated at the start of a game, or in game. I'm pretty sure armless gets added based of the damage to the unit.

would the unit role go on the Alpha Strike tab?

I think that would be a great spot for it.

I know this would be feature creep but if you could fit any more of these in it would be huge.
#1953

I also fully understand if that is beyond the scope of this PR.

@HammerGS
Copy link
Member

I think this PR would address this - #1994?

@kuronekochomusuke kuronekochomusuke changed the title add Filter entity type to advance search add additional filters to advance search Jan 23, 2023
@HammerGS
Copy link
Member

HammerGS commented Feb 4, 2023

I've been using this a lot and it works really well. But one thing I'm finding I'm doing more is starting with Unit Type then going to Base. I'm wondering if the tab order should be

  • Unit Type
  • Base
  • Weapons
  • Transports
  • Quirks (since this is an option rule)

Any thoughts on this or customizable?

@HammerGS
Copy link
Member

HammerGS commented Feb 8, 2023

When this is done will they also search in MegaMekLab and MekHQ?

@kuronekochomusuke
Copy link
Collaborator Author

it looks like they will, since they use the advance search with the Alpha Strike tab. The other advance search does not have it.

@HammerGS
Copy link
Member

HammerGS commented Feb 8, 2023

Another suggestion. Would it be possible to have a clear button on each tab? Things like Unit Type can get pretty busy and sometimes you just want to reset the tab you're on. As opposed to backing all the way out.

@HammerGS
Copy link
Member

HammerGS commented Feb 8, 2023

I've opened a thread on the CGL forums to monitor for feedback and suggestions - https://bg.battletech.com/forums/megamek-games/advanced-search-improvements-coming-to-megamek/

So far a request for vehicle motive system, which I would be a big one.

@kuronekochomusuke
Copy link
Collaborator Author

can already search for motive modes on the Alpha Strike tab

@HammerGS
Copy link
Member

HammerGS commented Feb 8, 2023

Another request from the forums - A filter for units with Hands.

@kuronekochomusuke kuronekochomusuke marked this pull request as ready for review February 11, 2023 22:08
@kuronekochomusuke
Copy link
Collaborator Author

ready for review

Copy link
Member

@SJuliez SJuliez left a comment

Choose a reason for hiding this comment

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

OK great stuff, I have some comments. If I have commented on something that is clearly a legacy issue then give a comment on that.

megamek/src/megamek/common/Engine.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSummary.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
megamek/src/megamek/common/MechSearchFilter.java Outdated Show resolved Hide resolved
@SJuliez SJuliez merged commit 3e27cf7 into MegaMek:master Feb 15, 2023
@kuronekochomusuke kuronekochomusuke deleted the filterEType branch March 3, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Advanced Search RFE's related to improving the advanced search. GUI User Interface (RFE) Enhancement Requests for Enhancement, new features or implementations
Projects
None yet
3 participants