-
Notifications
You must be signed in to change notification settings - Fork 157
Implement DNI, EI Interface, and Damage Interrupt Circuit UI #2128
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This pull request implements UI support for three cockpit modification equipment types in MegaMekLab: DNI (Direct Neural Interface) Cockpit Modification, Enhanced Imaging (EI) Interface, and Damage Interrupt Circuit. The implementation adds checkboxes to various unit type editors and integrates game year validation for equipment availability.
Changes:
- Added UI checkboxes for DNI, EI, and DIC across multiple unit types (Meks, Combat Vehicles, Aerospace Fighters, Support Vehicles, Battle Armor)
- Updated build listener interfaces to handle cockpit modification state changes
- Enhanced game year validation in unit verification to respect the "Use Game Year" configuration setting
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| UnitUtil.java | Adds game year validation support when "Use Game Year" setting is enabled |
| BMChassisView.java | Adds DNI, EI, and DIC checkboxes to Mek chassis view |
| BMStructureTab.java | Implements equipment add/remove logic for Mek cockpit modifications |
| CVChassisView.java | Adds DNI checkbox to Combat Vehicle chassis view |
| CVStructureTab.java | Implements DNI equipment handling for Combat Vehicles |
| ASChassisView.java | Adds DNI checkbox to Aerospace/Conventional Fighter chassis view |
| ASStructureTab.java | Implements DNI equipment handling for Aerospace Fighters |
| SVChassisView.java | Adds DNI checkbox to Support Vehicle chassis view |
| SVStructureTab.java | Implements DNI equipment handling for Support Vehicles |
| BAEnhancementView.java | Adds DNI and EI checkboxes to Battle Armor enhancement view |
| MekBuildListener.java | Adds interface methods for DNI, EI, and DIC events |
| CVBuildListener.java | Adds interface method for DNI events |
| AeroBuildListener.java | Adds interface method for DNI events |
| SVBuildListener.java | Adds interface method for DNI events |
| Views.properties | Adds i18n strings for all new UI labels and tooltips |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
megameklab/src/megameklab/ui/battleArmor/BAEnhancementView.java
Outdated
Show resolved
Hide resolved
megameklab/src/megameklab/ui/battleArmor/BAEnhancementView.java
Outdated
Show resolved
Hide resolved
megameklab/src/megameklab/ui/battleArmor/BAEnhancementView.java
Outdated
Show resolved
Hide resolved
163ebc6 to
b033d6d
Compare
|
It would be more consistent with the rest of the interface if the checkboxes were hidden rather than disabled if the equipment isn't allowed by year or tech base. |
|
The page number references in the tooltips are to the old IO, not to Alternate Eras, we should use the more up-to-date book. |
|
The DNI mod appears on record sheets for Battle Armor, but not any other unit types. Let me know if you want me to handle the record sheet stuff for these. |
- Add cockpit modification UI to BMChassisView (Meks) - Add DNI checkbox to CVChassisView (Combat Vehicles) - Add DNI checkbox to ASChassisView (Aerospace/Conventional Fighters) - Add DNI checkbox to SVChassisView (Support Vehicles) - Add DNI/EI checkboxes to BAEnhancementView (Battle Armor) - Update structure tabs to handle cockpit modification changes - Add BuildListener methods for cockpit modification events - Update UnitUtil.validateUnit() to respect game year setting - Add i18n strings for cockpit modification labels Co-Authored-By: Claude Opus 4.5 <[email protected]>
b033d6d to
ca9973a
Compare
I feel like this is so edge its not worth a box, I'm off the do nothing till asked till then players can write it in. |
) ## Summary Adds core support loading and improvements to validating for three cockpit modification equipment types: DNI Cockpit Modification (IS, Advanced), Enhanced Imaging (EI) Interface (Clan, Experimental), and Damage Interrupt Circuit (IS, Experimental). Also adds game year validation support for equipment availability. **Requires:** MegaMekLab PR [`Implement-DNI-EI-DIC-UI`](MegaMek/megameklab#2128) for full UI functionality. ## Changes 1. Add equipment definitions with correct tech levels (DNI=Advanced, DIC=Experimental) 2. Add BLK file save/load for slotless (LOC_NONE) equipment across all unit types 3. Fix Unit Viewer to display cockpit modifications for non-Mek units 4. Add game year support in ITechManager.isLegal() for equipment availability 5. Add game year support in TestEntity.hasIncorrectIntroYear() for validation 6. Mark DNI and EI as retrofittable equipment (skipped in intro year validation per IO p.69) ## Files Changed - `MiscType.java` - Tech level fixes for DNI and DIC - `ITechManager.java` - Game year support in isLegal() - `TestEntity.java` - Game year field and validation support - `BLKFile.java` - Slotless equipment save/load methods - `BLK*File.java` (10 files) - Load slotless equipment for each unit type - `ReadoutUtils.java` - Show cockpit mods in Unit Viewer - `*TROView.java` (4 files) - TRO display for cockpit mods - `CockpitModificationTest.java` - Unit tests for save/load - `TestEntityGameYearValidationTest.java` - Unit tests for game year validation ## Testing - **Unit Tests:** 17 tests covering save/load and game year validation (all passing) - **Manual Testing:** Verified on Mek, Combat Vehicle, Conventional Fighter, Aerospace Fighter, Support Vehicle (Ground/VTOL), Battle Armor (IS/Clan) - **Game Year Validation:** Tested EI (intro 3040) and DNI (intro 3052) with game years before/after intro dates
Summary
Adds MegaMekLab UI support for three cockpit modification equipment types: DNI Cockpit Modification, Enhanced Imaging (EI) Interface, and Damage Interrupt Circuit. Includes game year validation support.
Requires: MegaMek PR
Implement-DNI-EI-DIC-Supportfor core equipment support.Changes
Files Changed
BMChassisView.java- Mek cockpit modification UI (DNI, EI, DIC)CVChassisView.java- Combat Vehicle DNI checkboxASChassisView.java- Aerospace/Conv Fighter DNI checkboxSVChassisView.java- Support Vehicle DNI checkboxBAEnhancementView.java- Battle Armor DNI/EI checkboxesBMStructureTab.java- Mek structure tab integrationCVStructureTab.java- Combat Vehicle structure tab integrationASStructureTab.java- Aerospace structure tab integrationSVStructureTab.java- Support Vehicle structure tab integrationMekBuildListener.java- Mek listener interfaceCVBuildListener.java- Combat Vehicle listener interfaceAeroBuildListener.java- Aerospace listener interfaceSVBuildListener.java- Support Vehicle listener interfaceUnitUtil.java- Game year validation supportViews.properties- i18n strings for UI labelsTesting