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

FighterSquadron updates #5841

Merged
merged 7 commits into from
Aug 4, 2024
Merged

FighterSquadron updates #5841

merged 7 commits into from
Aug 4, 2024

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented Aug 2, 2024

This PR addresses a few issues around FighterSquadrons:

  • in Entity, puts a null guard in the isTrapped check; this is a sad stopgap for when FS are created and the updates trickle in in separate packets; but dealing with this properly is a bigger thing
  • a small code update in FS bomb creation, no change in result
  • in IAero, update Cap Fighter weapon groups only when the Cap Fighter game option is active (normal fighters were constantly getting weapon groups assigned, curiously this was only visible when looking closely at the equipment using DebugEntity, it apparently didnt create any bugs)
  • in GameManager, when creating an FS, changes code that erased bomb choices from the affected fighters and adds code to update the new FS appropriately
  • For a FS, DebugEntity now outputs the fighter data as well as the FS itself
  • adds a little dogfight scenario on a sky map (atmo map without terrain) as a version-independent test setup

In case anyone's wondering what DebugEntity does, it gives detailed equipment data; this is part of an output for a FS:

Chassis: >A Squadron<
Model: ><
Game ID: 5
Equipment:
[0] [Weapon] ISMediumPulseLaser (NOS) { Group, #Weapons: 4 }
[1] [Weapon] SRM 6 (WNG) { Linked: [Entity [Corax CRX-OA ID:1 (Legion of Vega), ID: 1]:4], Group, #Weapons: 4 }
[2] [Weapon] Small Laser (AFT) { Group, #Weapons: 8 }
[3] [Weapon] Medium Laser (WNG) { Group, #Weapons: 8 }

Locations:
NOS:
[0] Equipment Slot { [0] ISMediumPulseLaser -Group- }
LWG:
RWG:
AFT:
[0] Equipment Slot { [2] Small Laser -Group- }
WNG:
[0] Equipment Slot { [1] SRM 6 -Group- }
[1] Equipment Slot { [3] Medium Laser -Group- }
FSLG:


Chassis: >Corax<
Model: >CRX-OA<
Game ID: 1
Equipment:
[0] [Weapon] SRM 6 (LWG-Pod) { Linked: [4] }
[1] [Weapon] SRM 6 (RWG-Pod) { Linked: [4] }
[2] [Weapon] Small Laser (AFT-Pod) {  }
[3] [Weapon] Small Laser (AFT-Pod) {  }
[4] [Ammo] IS Ammo SRM-6 (FSLG-Pod) { LinkedBy: [Entity [A Squadron ID:5 (Legion of Vega), ID: 5]:1], Shots: 15 }
[5] [Ammo] IS Ammo SRM-6 (FSLG-Pod) { Shots: 15 }
[6] [Weapon] SRM 6 (WNG) { Linked: [4], Group, #Weapons: 2 }
[7] [Weapon] Small Laser (AFT) { Group, #Weapons: 2 }

Locations:
NOS:
LWG:
[0] Equipment Slot { [0] SRM 6 }
RWG:
[0] Equipment Slot { [1] SRM 6 }
AFT:
[0] Equipment Slot { [2] Small Laser }
[1] Equipment Slot { [3] Small Laser }
[2] Equipment Slot { [7] Small Laser -Group- }
WNG:
[0] Equipment Slot { [6] SRM 6 -Group- }
FSLG:
[0] Equipment Slot { [4] IS Ammo SRM-6 }
[1] Equipment Slot { [5] IS Ammo SRM-6 }

...

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.98%. Comparing base (d349884) to head (55b3d63).
Report is 18 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5841      +/-   ##
============================================
- Coverage     29.01%   28.98%   -0.03%     
+ Complexity    13923    13909      -14     
============================================
  Files          2511     2511              
  Lines        267117   267229     +112     
  Branches      47784    47823      +39     
============================================
- Hits          77504    77460      -44     
- Misses       185661   185819     +158     
+ Partials       3952     3950       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sleet01 Sleet01 merged commit 887fff7 into MegaMek:master Aug 4, 2024
5 checks passed
@SJuliez SJuliez deleted the aero-bombs-fs branch October 15, 2024 19:32
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.

3 participants