MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
131 stars 168 forks source link

Added Contract Difficulty Estimate, Including GUI Support #4943

Open IllianiCBT opened 2 days ago

IllianiCBT commented 2 days ago

Requires #6046 (tests will fail until that PR is merged)

Refactored the AtBContract class to include methods for calculating and displaying contract difficulty. Added UI elements in ContractMarketDialog and ContractSummaryPanel to show difficulty estimates.

Added dialog calls for when the player is picking unusually easy or overly challenging contracts.

Enhanced code maintainability by removing a long switch statement for faction logos and replaced it with a function call. Expanded the switch to include all factions we have logos for, and not just the Clan factions.

image image image image image