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

feat: added sensor range on minimap, added facing arrow on minimap #6446

Merged
merged 6 commits into from
Jan 31, 2025

Conversation

Scoppio
Copy link
Collaborator

@Scoppio Scoppio commented Jan 27, 2025

Both options are available on the client options in the minimap tab, they are also accessible through the minimap right click contextual menu.

Example

Screenshot 2025-01-27 at 01 09 26

Quirks

The external braket is half hex bigger, while the internal bracket is half hex smaller, so an 8-16 sensor is shown around 7.5 - 16.5

@Scoppio Scoppio force-pushed the feat/minimap-sensor=facing branch from c15ac08 to cbc096d Compare January 27, 2025 02:55
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.57%. Comparing base (54e363b) to head (5a2b5da).
Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6446      +/-   ##
============================================
- Coverage     28.59%   28.57%   -0.02%     
- Complexity    14377    14381       +4     
============================================
  Files          2798     2798              
  Lines        274895   275057     +162     
  Branches      48630    48665      +35     
============================================
+ Hits          78593    78601       +8     
- Misses       191669   191822     +153     
- Partials       4633     4634       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


/** Draws the symbol for a single entity. Checks visibility in double blind. */
private void paintSensor(Graphics g, Entity entity) {
if (EntityVisibilityUtils.onlyDetectedBySensors(client.getLocalPlayer(), entity)) {

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning

Variable
client
may be null at this access as suggested by
this
null guard.
@Scoppio Scoppio self-assigned this Jan 27, 2025
@Scoppio Scoppio added GUI User Interface Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature labels Jan 27, 2025
if (border) {
g.setColor(g.getColor().darker());
}
// if (border) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

Just one commented-out block that needs excising, otherwise great!

@Scoppio Scoppio requested a review from Sleet01 January 29, 2025 00:05
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

Good to go.

@@ -2070,7 +2078,7 @@ public void setVisible(boolean visible) {
}
}

minimapTheme.setSelectedItem(CLIENT_PREFERENCES.getMinimapTheme());
minimapTheme.setSelectedItem(CLIENT_PREFERENCES.getMinimapTheme().getName());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes #6464

Copy link
Collaborator Author

@Scoppio Scoppio left a comment

Choose a reason for hiding this comment

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

.

@Sleet01 Sleet01 merged commit 1d63750 into MegaMek:master Jan 31, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI User Interface Improvement to Existing Feature Used with the RFE tag to indicate an improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants