Skip to content
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

Merged
merged 10 commits into from
Nov 23, 2024
Merged

Implement RISC laser pulse module #6209

merged 10 commits into from
Nov 23, 2024

Conversation

neoancient
Copy link
Member

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.

@@ -502,7 +502,7 @@ public boolean isSpreadable() {
return spreadable;
}

public int getToHitModifier() {
public int getToHitModifier(@Nullable Mounted<?> mounted) {
Copy link
Member Author

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.

Copy link
Member

@HammerGS HammerGS left a 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.

@HammerGS HammerGS merged commit 2590e1e into master Nov 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants