-
Notifications
You must be signed in to change notification settings - Fork 292
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
Implement RISC laser pulse module #6209
Conversation
@@ -502,7 +502,7 @@ public boolean isSpreadable() { | |||
return spreadable; | |||
} | |||
|
|||
public int getToHitModifier() { | |||
public int getToHitModifier(@Nullable Mounted<?> mounted) { |
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.
There are some cases (particularly in AlphaStrike and BattleForce conversion code) where the Mounted is not available. In those cases a null
is passed, which skips the check for the laser pulse module.
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 work. Kinda fun piece of kit.
This required changes to method signatures of EquipmentType::getToHitModifier and EquipmentType::getModesCount. getToHitModifier needs to know the weapon's mode and getModesCount needs to know whether the mount is linked by a laser pulse module. I added a getToHitModifier with no parameters to AmmoType (which is the old signature) to reduce the number of changes to the code.