-
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
WIP - Equipment/Unit modifiers (salvage quality, partial repair, scenario effect) #6229
base: master
Are you sure you want to change the base?
WIP - Equipment/Unit modifiers (salvage quality, partial repair, scenario effect) #6229
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6229 +/- ##
============================================
- Coverage 29.17% 28.99% -0.18%
- Complexity 13970 13982 +12
============================================
Files 2628 2664 +36
Lines 266540 268280 +1740
Branches 47565 47743 +178
============================================
+ Hits 77769 77799 +30
- Misses 184889 186596 +1707
- Partials 3882 3885 +3 ☔ View full report in Codecov by Sentry. |
@@ -1775,4 +1778,8 @@ | |||
state.add("Size: " + size); | |||
return intro + " { " + String.join(", ", state) + " }"; | |||
} | |||
|
|||
public List<EquipmentModifier> getModifiers() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note
Modifiable.getModifiers
# Conflicts: # megamek/data/scenarios/Kell Hounds/ToSaveAPrince/ToSaveAPrince.mms
} | ||
|
||
private String modifierText(EquipmentModifier modifier) { | ||
if (modifier instanceof HeatModifier heatModifier) { |
Check notice
Code scanning / CodeQL
Chain of 'instanceof' tests Note
@@ -15822,4 +15860,8 @@ | |||
fleeZone = HexArea.EMPTY_AREA; | |||
hasFleeZone = false; | |||
} | |||
|
|||
public List<EquipmentModifier> getModifiers() { |
Check notice
Code scanning / CodeQL
Missing Override annotation Note
Modifiable.getModifiers
* @return Weapons of this vehicle that are jammed and can be de-jammed so as to work again. Other weapons on the tank might be jammed | ||
* without the option to return them to a working state within the current game. Those are not part of the returned list. | ||
*/ | ||
public List<Mounted<?>> getDejammableWeapons() { |
Check notice
Code scanning / CodeQL
Exposing internal representation Note
This PR aims to add modifiers to equipment that simulate salvage quality (CO p215), partial repair (CO, 205-207) and scenario effects. These include +x heat, +x to hit, jam, reduced range and others. These are applied to Mounteds or sometimes maybe the Entity if there is no corresponding Mounted (e.g. gyro) but also possibly to MHQ's Parts so that a salvage quality medium laser (which requires rolling up a specific modifier for it) could actually be buyable or obtained from battle salvage.
very much work in progress. Some modifiers are fairly easy to implement, others not so much.