-
Notifications
You must be signed in to change notification settings - Fork 291
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: new GM commands and client commands [WIP] #6242
Conversation
playersChangingTeam.clear(); | ||
|
||
// Changes requested by players follow the default behavior | ||
legacyProcessTeamChangeRequest(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
TWGameManager.legacyProcessTeamChangeRequest
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6242 +/- ##
============================================
- Coverage 28.99% 28.92% -0.07%
Complexity 13982 13982
============================================
Files 2652 2672 +20
Lines 268296 268935 +639
Branches 47764 47821 +57
============================================
+ Hits 77799 77802 +3
- Misses 186615 187251 +636
Partials 3882 3882 ☔ View full report in Codecov by Sentry. |
} | ||
|
||
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
if (wtype != null) { | ||
r.add(wtype.getName() + " (" + atype.getShortName() + ')'); | ||
if (weaponType != null) { | ||
r.add(weaponType.getName() + " (" + ammoType.getShortName() + ')'); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
ammoType
this
@@ -120,12 +120,12 @@ | |||
r.subject = subjectId; | |||
r.indent(2); | |||
r.newlines++; | |||
r.add(wtype.getName() + " " + ammoType.getSubMunitionName()); | |||
r.add(wtype.getRackSize()); | |||
r.add(weaponType.getName() + " " + ammoType.getSubMunitionName()); |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
weaponType
this
@@ -111,7 +111,7 @@ | |||
bMissed = roll.getIntValue() < toHit.getValue(); | |||
// Set Margin of Success/Failure. | |||
toHit.setMoS(roll.getIntValue() - Math.max(2, toHit.getValue())); | |||
int duration = wtype.getRackSize() * 2; | |||
int duration = weaponType.getRackSize() * 2; |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
weaponType
this
@@ -112,7 +112,7 @@ | |||
bMissed = roll.getIntValue() < toHit.getValue(); | |||
// Set Margin of Success/Failure. | |||
toHit.setMoS(roll.getIntValue() - Math.max(2, toHit.getValue())); | |||
int duration = wtype.getRackSize() * 2; | |||
int duration = weaponType.getRackSize() * 2; |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
weaponType
this
int missileDamage = (wtype instanceof LRMWeapon) ? 1 : 2; | ||
int mineDamage = wtype.getRackSize() * missileDamage; | ||
int missileDamage = (weaponType instanceof LRMWeapon) ? 1 : 2; | ||
int mineDamage = weaponType.getRackSize() * missileDamage; |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null Warning
No description provided.