How samuxarick/league-tables works
Main Components Structure
a) Entry Point Layer
b) League Table Categories
Create two main groupings:
Company Performance Tables
• Company Value Table
• Most Profitable Vehicle (Generic)
Infrastructure Efficiency Tables
• Rail Infrastructure
• Road Infrastructure
• Canal Infrastructure
• Airport Infrastructure
c) Vehicle-Specific Tables
• Train Profitability
• Road Vehicle Profitability
• Ship Profitability
• Aircraft Profitability
Component Relationships
a) Data Flow
• Main.nut → League Table Categories
• Vehicle-specific data feeding into the general "Most Profitable Vehicle" table
b) Dependencies
• How infrastructure efficiency calculations depend on both vehicle profit data and infrastructure count
Specific Implementation Details
Key elements:
• How each .nut file processes its specific metrics
• Input parameters and output format
b) Language Support
• A small component showing language file integration (lang/english.txt)
Support systems (language, info) on the side
This structure will effectively communicate how the script integrates with OpenTTD while maintaining separation of concerns between different league table implementations.
Key Relationships to Highlight:
• How vehicle profit calculations feed into both specific and general rankings
• How infrastructure metrics combine with profit data
• The centralized control flow from main.nut