-
Notifications
You must be signed in to change notification settings - Fork 294
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: adding force view to commander gui, mouse clicks and more #6612
base: master
Are you sure you want to change the base?
Conversation
…re also on their way
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6612 +/- ##
============================================
- Coverage 29.13% 29.04% -0.10%
- Complexity 15366 15377 +11
============================================
Files 2863 2868 +5
Lines 279868 280763 +895
Branches 49291 49429 +138
============================================
+ Hits 81553 81555 +2
- Misses 192855 193754 +899
+ Partials 5460 5454 -6 ☔ View full report in Codecov by Sentry. |
private JMenu createSpecialHexDisplayMenu() { | ||
JMenu menu = new JMenu("Special Hex Display"); | ||
|
||
final Collection<SpecialHexDisplay> shdList = game.getBoard().getSpecialHexDisplay(coords); |
Check notice
Code scanning / CodeQL
Unread local variable Note
String type = target.nextToken(); | ||
|
||
if (type.equalsIgnoreCase("E")) { | ||
return game.getEntity(Integer.parseInt(target.nextToken())); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
return game.getEntity(Integer.parseInt(target.nextToken())); | ||
} | ||
|
||
Coords targetCoords = new Coords(Integer.parseInt(target.nextToken()), |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
} | ||
|
||
Coords targetCoords = new Coords(Integer.parseInt(target.nextToken()), | ||
Integer.parseInt(target.nextToken())); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
Integer.parseInt(target.nextToken())); | ||
|
||
if (type.equals("B")) { | ||
return new BuildingTarget(targetCoords, board, Integer.parseInt(target.nextToken())); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
return new MinefieldTarget(targetCoords); | ||
} | ||
|
||
return new HexTarget(targetCoords, Integer.parseInt(target.nextToken())); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
public void displayMek(Entity entity) { | ||
Player localPlayer = unitDisplay.getClientGUI().getClient().getLocalPlayer(); | ||
public void displayMek(Entity entity, Player localPlayer, Game game, Board board) { | ||
Hex mhex = board.getHex(entity.getPosition()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
What does it do?
Adds force view to the Commanders GUI in place of the weird entities list and some mouse actions on the map, also renames the "map" to StrategicView.
A few panels are also changed to better serve both ClientGUI and Commanders GUI.
A few minor improvements to the StrategicView in how it paint stuff, and I am adding a way to allow the player to select one or many units.