-
Notifications
You must be signed in to change notification settings - Fork 293
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
Conversation
c15ac08
to
cbc096d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
|
||
/** 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
client
this
megamek/src/megamek/client/ui/swing/minimap/BoardviewlessMinimap.java
Outdated
Show resolved
Hide resolved
if (border) { | ||
g.setColor(g.getColor().darker()); | ||
} | ||
// if (border) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
There was a problem hiding this 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!
There was a problem hiding this 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #6464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Both options are available on the client options in the minimap tab, they are also accessible through the minimap right click contextual menu.
Example
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