Introduce CurrentLocationPanel and TransitStatusChangedEvent#9092
Merged
Conversation
This change introduces a brand new `CurrentLocationPanel` that displays a location image, planetary conditions, socio-industrial data, travel progress, jump costs, and the hiring hall button. Additionally, it takes a stab at a cleaner separation of event processing and domain logic versus the UI layer, simplifies `AbstractLocation` and `CampaignGUI` logic. Detailed changes: - `AbstractLocation.getReport` separated into more specific methods (`getTitle`, `getPlanetaryConditionsInfo`, `getCourseInfo`, `getJumpCostInfo`, `getSocioIndustrialInfo`) and moved to `CurrentLocationPanel` - Hiring Hall button moved from the Marketplace panel to the `CurrentLocationPanel`, conditionally enabling based on its availability - Planetary conditions surfaced in the UI including highlighting based on modifiers they provide - Introduced `TransitStatusChangedEvent` to broadcast in-system transit ticks, jump path alterations, and jumpship charging progress - Removed manual UI updates, simplifying `CampaignGUI` and other map views by relying on event subscriptions - Renamed the GM charging action from `setRecharged()` to `chargeFully()` - Improved test coverage for `CurrentLocation`, notably for `newDay` - Switched to `campaign.isUseCommandCircuit()` calls where possible
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9092 +/- ##
============================================
+ Coverage 15.21% 15.22% +0.01%
- Complexity 9296 9330 +34
============================================
Files 1304 1308 +4
Lines 172561 173079 +518
Branches 26080 26165 +85
============================================
+ Hits 26254 26354 +100
- Misses 143260 143669 +409
- Partials 3047 3056 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // Handle current location and travel status change events | ||
|
|
||
| @Subscribe | ||
| public void handleLocationChanged(LocationChangedEvent e) { |
| } | ||
|
|
||
| @Subscribe | ||
| public void handleTransitStatusChanged(TransitStatusChangedEvent e) { |
psikomonkie
requested changes
May 25, 2026
Member
psikomonkie
left a comment
There was a problem hiding this comment.
Nice! I love the new CurrentLocationPanel! I'm glad that inside CurrentLocationPanel it uses AbstractLocation.
Two requested changes, but otherwise I think this looks great.
Thanks!
psikomonkie
approved these changes
May 25, 2026
Member
psikomonkie
left a comment
There was a problem hiding this comment.
Excellent, thanks for getting those changes in quick, hokvel! This is approved!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces a brand new
CurrentLocationPanelthat displays a location image, planetary conditions, socio-industrial data, travel progress, jump costs, and the hiring hall button. Additionally, it takes a stab at a cleaner separation of event processing and domain logic versus the UI layer, simplifiesAbstractLocationandCampaignGUIlogic.Detailed changes:
AbstractLocation.getReportseparated into more specific methods (getTitle,getPlanetaryConditionsInfo,getCourseInfo,getJumpCostInfo,getSocioIndustrialInfo) and moved toCurrentLocationPanelCurrentLocationPanel, conditionally enabling based on its availabilityTransitStatusChangedEventto broadcast in-system transit ticks, jump path alterations, and jumpship charging progressCampaignGUIand other map views by relying on event subscriptionssetRecharged()tochargeFully()CurrentLocation, notably fornewDaycampaign.isUseCommandCircuit()calls where possible