Tradeship Rework#95
Merged
Merged
Conversation
…el to track capital
- Introduced a centralized trade system with demand accumulation and route management. - Enhanced WarshipExecution to engage trade ships based on war status and embargo rules. - Added trade route metadata to Unit interface for tracking trade route owners and cargo. - Implemented CapturedTradeShipReturnExecution to handle captured trade ships returning to ports. - Updated UnitImpl to manage trade route owners and cargo gold. - Created TradeManagerExecution to manage trade routes, including spawning trade ships and handling replacements. - Added tests for trade manager functionality, including trade completion, interception of neutral ships, and payout verification.
…g in TradeManagerExecution
…on war status and safety conditions
…n TradeManagerExecution
…oute assignment and income distribution
…tracking in ports
…d in TradeManagerExecution
…nts and selections
…and ensure kicked clients are disconnected
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 pull request introduces a new Trade tab in the control panel UI, improves trade ship management and visibility, adds a debug pointer coordinates overlay, and refactors trade-related game logic for better maintainability and extensibility. The changes also include minor UI and code improvements for clarity and robustness.
Trade System and UI Improvements
ControlPanel2) that displays active trade ships, their statuses, queued trade ship construction, and a demand indicator. This includes a new_renderTradeTab()method for detailed trade ship and port information. [1] [2] [3]_computeTradeShipStatus()to provide more accurate and user-friendly descriptions of ship states.Game Logic and Trade Management
TradeManagerExecutionandCapitalRecalculationExecutionin the game runner to centralize trade demand/supply assignment and periodically compute player capitals, supporting the new trade system. [1] [2]gdpFactor()method to the game configuration interface for future economic calculations related to trade and player GDP.Debugging and UI Enhancements
PointerCoordsLayerfor displaying world coordinates next to the mouse pointer in debug mode, improving development and map navigation. [1] [2] [3] [4]Code Quality and Robustness
||to??for default values to handle falsy values more robustly in several places. [1] [2]These changes collectively enhance the user experience around trade ships, improve maintainability of the codebase, and add useful debugging tools for development.