-
Notifications
You must be signed in to change notification settings - Fork 290
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: add new chat commands, updates a bit the commands gui, give nukes to GMs #6245
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
private JComponent getArgumentComponent(Argument<?> argument) { | ||
if (argument instanceof CoordXArgument intArg) { |
Check notice
Code scanning / CodeQL
Chain of 'instanceof' tests Note
1)); | ||
} | ||
|
||
private JSpinner createSpinner(CoordXArgument coordX) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
1)); | ||
} | ||
|
||
private JSpinner createSpinner(CoordYArgument coordY) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
1)); | ||
} | ||
|
||
private JComboBox<String> createPlayerComboBox(PlayerArgument playerArgument) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
return comboBox; | ||
} | ||
|
||
private JComboBox<String> createUnitComboBox(UnitArgument unitArgument) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
return comboBox; | ||
} | ||
|
||
private JComboBox<String> createTeamsComboBox(TeamArgument teamArgument) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
@@ -73,4 +73,6 @@ | |||
* @param event | |||
*/ | |||
default void gameUnitChange(GameEvent event) { } | |||
|
|||
default void gamePlayerStrategicAction(GamePlayerStrategicActionEvent e) { } |
Check notice
Code scanning / CodeQL
Useless parameter Note
@@ -364,8 +398,23 @@ | |||
return requestedTeam; | |||
} | |||
|
|||
/** |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
TWGameManager.legacyProcessTeamChangeRequest
e2d0846
to
b224fc2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6245 +/- ##
============================================
- Coverage 28.99% 28.94% -0.06%
- Complexity 13982 13984 +2
============================================
Files 2652 2669 +17
Lines 268296 268820 +524
Branches 47764 47815 +51
============================================
+ Hits 77799 77805 +6
- Misses 186615 187131 +516
- Partials 3882 3884 +2 ☔ View full report in Codecov by Sentry. |
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.
Tested and seems to be working.
@Scoppio Just want to confirm this is complete and ready to merge. |
Even more GM tools
Change player team
This GM command allow the GM to change players from teams manually, no need for doing it just one player per turn. It is still done at the end of the round, but the teams can be reassigned freely until them.
End game
This command from the GM just ends the game, no need for voting, it may also be forced to end immediatelly. It also declares one team as victorious, but things like MHQ will keep doing what it does to decide who won the game.
Nuclear Strike & Nuclear Strike Custom
Just more modern implementations of the old command "Nuke", these can only be called by the GM.
GameListener gamePlayerStrategicAction
Triggers an event that can be picked up by MHQ whenever a player uses a nuclear strike or something else.
GUI commands
Implements some intelligence/automation for GUI Commands (the chat commands shown in a GUI). If So now there are the PlayerArgument, UnitArgument, TeamArgument, so they list the players, teams and units. This allows for a more rich experience when using those tools instead of just random numbers appearing out of nowhere.
Draw nuke
Now nukes from Arty should be drawn on the game too.