-
Notifications
You must be signed in to change notification settings - Fork 188
Improvement: Switched Faction Logos to Use Same Logos as Campaign Options IIC #6857
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6857 +/- ##
============================================
- Coverage 11.52% 11.52% -0.01%
Complexity 6567 6567
============================================
Files 1100 1100
Lines 140971 140961 -10
Branches 21845 21839 -6
============================================
- Hits 16243 16241 -2
+ Misses 123030 123019 -11
- Partials 1698 1701 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
case "TH" -> "logo_mercenaries"; // Terran Hegemony | ||
case "CI" -> "logo_mercenaries"; // Chainelane Isles | ||
case "SOC" -> "logo_mercenaries"; // The Society | ||
case "CWI" -> "logo_mercenaries"; // Clan Widowmaker | ||
case "EF" -> "logo_mercenaries"; // Elysian Fields | ||
case "GV" -> "logo_mercenaries"; // Greater Valkyrate | ||
case "JF" -> "logo_mercenaries"; // JarnFolk | ||
case "MSC" -> "logo_mercenaries"; // Marik-Stewart Commonwealth | ||
case "OP" -> "logo_mercenaries"; // Oriente Protectorate | ||
case "RA" -> "logo_mercenaries"; // Raven Alliance | ||
case "RCM" -> "logo_mercenaries"; // Rim Commonality | ||
case "NIOPS" -> "logo_mercenaries"; // Niops Association | ||
case "AXP" -> "logo_mercenaries"; // Axumite Providence | ||
case "NDC" -> "logo_mercenaries"; // New Delphi Compact |
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.
I'm currently working with an artist to add art for the missing icons, but for now we use mercenaries as a fallback.
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 PR updates the faction logo retrieval to use the same icons as Campaign Options IIC, addressing scaling inconsistencies and unifying design. Key changes include replacing calls to getFactionLogo that depend on a Campaign and a boolean flag with a new method based solely on game year and faction code, and deprecating the old method in favor of a more consistent API.
- Updated dialog classes to use getFactionLogo(int, String) with campaign.getGameYear().
- Removed fallback parameter and deprecated the old getFactionLogo(Campaign, String, boolean) method.
- Adjusted multiple files (di 8000 alogs, contracts, campaign, etc.) to use the new API.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
MekHQ/src/mekhq/gui/dialog/resupplyAndCaches/DialogSwindled.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/gui/dialog/resupplyAndCaches/DialogItinerary.java | Updated faction logo retrieval calls |
MekHQ/src/mekhq/gui/dialog/randomEvents/GrayMondayDialog.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/gui/dialog/RetirementDefectionDialog.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/gui/dialog/ContractMarketDialog.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/campaign/universe/Factions.java | Introduced new API and deprecated the old method |
MekHQ/src/mekhq/campaign/mission/resupplyAndCaches/StarLeagueCache.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/campaign/mission/AtBContract.java | Updated faction logo retrieval call |
MekHQ/src/mekhq/campaign/Campaign.java | Updated faction logo retrieval call |
Comments suppressed due to low confidence (2)
MekHQ/src/mekhq/campaign/universe/Factions.java:302
- Consider adding an inline comment explaining the fallback logic here to clarify why these specific logos are selected based on gameYear.
if (gameYear >= 3060) { yield "logo_rasalhague_dominion"; } else { yield "logo_clan_ghost_bear"; }
MekHQ/src/mekhq/campaign/universe/Factions.java:264
- Verify that all references have been updated to use the new getFactionLogo(int, String) method before eventually removing this deprecated method.
@Deprecated(since = "0.50.06", forRemoval = true)
Previously I set us up to use the colored icons found in the force icon section of data images. However those icons were designed for force icons and ended up with some really weird scaling.
This PR moves us to use the same icons that we're already using in Campaign Options IIC. This has a few benefits: more consistent scaling, and a unity of design. A player will see the faction icon for Clan Wolf in CO IIC and then, when they encounter Clan Wolf in the field, will see the same icon again.
This PR is required for #6858 and I would like to see both merged into 50.06.