OpenTTD GameScript API  20240328-master-gca53e134be
Data Structures
Here are the data structures with brief descriptions:
 CGSAccountingClass that keeps track of the costs, so you can request how much a block of commands did cost in total
 CGSAdminClass that handles communication with the AdminPort
 CGSAirportClass that handles all airport related functions
 CGSAsyncModeClass to switch current mode to Async Mode
 CGSBaseClass that handles some basic functions
 CGSBaseStationBase class for stations and waypoints
 CGSBridgeClass that handles all bridge related functions
 CGSBridgeListCreate a list of bridges types
 CGSBridgeList_LengthCreate a list of bridges types that can be built on a specific length
 CGSCargoClass that handles all cargo related functions
 CGSCargoListCreates a list of cargoes that can be produced in the current game
 CGSCargoList_IndustryAcceptingCreates a list of cargoes that the given industry accepts
 CGSCargoList_IndustryProducingCreates a list of cargoes that the given industry can produce
 CGSCargoList_StationAcceptingCreates a list of cargoes that the given station accepts
 CGSCargoMonitorClass that handles all cargo movement monitoring related functions
 CGSClientClass that handles all client related functions
 CGSClientListCreates a list of clients that are currently in game
 CGSClientList_CompanyCreates a list of clients that are playing in the company
 CGSCompanyClass that handles all company related functions
 CGSCompanyModeClass to switch the current company
 CGSControllerThe Controller, the class each GS should extend
 CGSDateClass that handles all date related (calculation) functions
 CGSDepotListCreates a list of the locations of the depots (and hangars) of which you are the owner
 CGSEngineClass that handles all engine related functions
 CGSEngineListCreate a list of engines based on a vehicle type
 CGSErrorClass that handles all error related functions
 CGSEventClass that handles all event related functions
 CGSEventAdminPortEvent Admin Port, indicating the admin port is sending you information
 CGSEventCompanyBankruptEvent Company Bankrupt, indicating a company has gone bankrupt
 CGSEventCompanyInTroubleEvent Company In Trouble, indicating a company is in trouble and might go bankrupt soon
 CGSEventCompanyMergerEvent Company Merger, indicating a company has been bought by another company
 CGSEventCompanyNewEvent Company New, indicating a new company has been created
 CGSEventCompanyTownBase class for events involving a town and a company
 CGSEventControllerClass that handles all event related functions
 CGSEventExclusiveTransportRightsEvent Exclusive Transport Rights, indicating that company bought exclusive transport rights in a town
 CGSEventGoalQuestionAnswerEvent Goal Question Answer, where you receive the answer given to your questions
 CGSEventIndustryCloseEvent Industry Close, indicating an industry is going to be closed
 CGSEventIndustryOpenEvent Industry Open, indicating a new industry has been created
 CGSEventRoadReconstructionEvent Road Reconstruction, indicating that company triggered road reconstructions in a town
 CGSEventStationFirstVehicleEvent Station First Vehicle, indicating a station has been visited by a vehicle for the first time
 CGSEventStoryPageButtonClickEvent StoryPageButtonClick, indicating a player clicked a push button on a storybook page
 CGSEventStoryPageTileSelectEvent StoryPageTileSelect, indicating a player clicked a tile selection button on a storybook page, and selected a tile
 CGSEventStoryPageVehicleSelectEvent StoryPageTileSelect, indicating a player clicked a tile selection button on a storybook page, and selected a tile
 CGSEventSubsidyAwardedEvent Subsidy Awarded, indicating a subsidy is awarded to some company
 CGSEventSubsidyExpiredEvent Subsidy Expired, indicating a route that was once subsidized no longer is
 CGSEventSubsidyOfferEvent Subsidy Offered, indicating someone offered a subsidy
 CGSEventSubsidyOfferExpiredEvent Subsidy Offer Expired, indicating a subsidy will no longer be awarded
 CGSEventTownFoundedEvent Town Founded, indicating a new town has been created
 CGSEventVehicleCrashedEvent Vehicle Crash, indicating a vehicle of yours is crashed
 CGSEventWindowWidgetClickEvent Window Widget Click, when a user clicks on a highlighted widget
 CGSExecModeClass to switch current mode to Execute Mode
 CGSGameClass that handles some game related functions
 CGSGameSettingsClass that handles all game settings related functions
 CGSGoalClass that handles some goal related functions
 CGSGroupClass that handles all group related functions
 CGSGroupListCreates a list of groups of which you are the owner
 CGSIndustryClass that handles all industry related functions
 CGSIndustryListCreates a list of industries that are currently on the map
 CGSIndustryList_CargoAcceptingCreates a list of industries that accepts a given cargo
 CGSIndustryList_CargoProducingCreates a list of industries that can produce a given cargo
 CGSIndustryTypeClass that handles all industry-type related functions
 CGSIndustryTypeListCreates a list of valid industry types
 CGSInfo'Abstract' class of the GSs use to register themselves
 CGSInfrastructureClass that handles all company infrastructure related functions
 CGSLeagueTableClass that handles league table related functions
 CGSListClass that creates a list which can keep item/value pairs, which you can walk
 CGSLogClass that handles all log related functions
 CGSMapClass that handles all map related functions
 CGSMarineClass that handles all marine related functions
 CGSNewGRFClass that handles all NewGRF related functions
 CGSNewGRFListCreate a list of loaded NewGRFs
 CGSNewsClass that handles news messages
 CGSObjectTypeClass that handles all object-type related functions
 CGSObjectTypeListCreates a list of valid object types
 CGSOrderClass that handles all order related functions
 CGSPriorityQueueClass that creates a queue which keeps its items ordered by an item priority
 CGSRailClass that handles all rail related functions
 CGSRailTypeListCreates a list of all available railtypes
 CGSRoadClass that handles all road related functions
 CGSRoadTypeListCreates a list of all available roadtypes
 CGSSignClass that handles all sign related functions
 CGSSignListCreate a list of signs your company has created
 CGSStationClass that handles all station related functions
 CGSStationListCreates a list of stations of which you are the owner
 CGSStationList_CargoCreates a list of stations associated with cargo at a station
 CGSStationList_CargoPlannedCreates a list of stations associated with cargo planned to pass a station
 CGSStationList_CargoPlannedByFromCreates a list of origin stations of cargo planned to pass a station, with the monthly amounts of cargo planned for each of those origin stations as values
 CGSStationList_CargoPlannedByViaCreates a list of next hops of cargo planned to pass a station, with the monthly amounts of cargo planned for each of those next hops as values
 CGSStationList_CargoPlannedFromByViaCreates a list of next hops of cargo planned to pass a station and originating from another station, with the monthly amounts of cargo planned for each of those next hops as values
 CGSStationList_CargoPlannedViaByFromCreates a list of origin stations of cargo planned to pass a station going via another station, with the monthly amounts of cargo planned for each of those origin stations as values
 CGSStationList_CargoWaitingCreates a list of stations associated with cargo waiting at a station
 CGSStationList_CargoWaitingByFromCreates a list of origin stations of waiting cargo at a station, with the amounts of cargo waiting from each of those origin stations as values
 CGSStationList_CargoWaitingByViaCreates a list of next hops of waiting cargo at a station, with the amounts of cargo waiting for each of those next hops as values
 CGSStationList_CargoWaitingFromByViaCreates a list of next hops of waiting cargo from a specific station at another station, with the amounts of cargo waiting for each of those next hops as values
 CGSStationList_CargoWaitingViaByFromCreates a list of origin stations of cargo waiting at a station for a transfer via another station, with the amounts of cargo waiting from each of those origin stations as values
 CGSStationList_VehicleCreates a list of stations which the vehicle has in its orders
 CGSStoryPageClass that handles story page related functions
 CGSStoryPageElementListCreate a list of all story page elements
 CGSStoryPageListCreate a list of all story pages
 CGSSubsidyClass that handles all subsidy related functions
 CGSSubsidyListCreates a list of all current subsidies
 CGSTestModeClass to switch current mode to Test Mode
 CGSTextClass that handles all text related functions
 CGSTileClass that handles all tile related functions
 CGSTileListCreates an empty list, in which you can add tiles
 CGSTileList_IndustryAcceptingCreates a list of tiles that will accept cargo for the given industry
 CGSTileList_IndustryProducingCreates a list of tiles which the industry checks to see if a station is there to receive cargo produced by this industry
 CGSTileList_StationCoverageCreates a list of tiles in the catchment area of the StationID
 CGSTileList_StationTypeCreates a list of tiles which have the requested StationType of the StationID
 CGSTownClass that handles all town related functions
 CGSTownEffectListCreates a list of all TownEffects known in the game
 CGSTownListCreates a list of towns that are currently on the map
 CGSTunnelClass that handles all tunnel related functions
 CGSVehicleClass that handles all vehicle related functions
 CGSVehicleListCreates a list of vehicles of which you are the owner
 CGSVehicleList_DefaultGroupCreates a list of vehicles that are in the default group
 CGSVehicleList_DepotCreates a list of vehicles that have orders to a given depot
 CGSVehicleList_GroupCreates a list of vehicles that are in a group
 CGSVehicleList_SharedOrdersCreates a list of vehicles that share orders
 CGSVehicleList_StationCreates a list of vehicles that have orders to a given station
 CGSViewportClass that manipulates the user's viewport
 CGSWaypointClass that handles all waypoint related functions
 CGSWaypointListCreates a list of waypoints of which you are the owner
 CGSWaypointList_VehicleCreates a list of waypoints which the vehicle has in its orders
 CGSWindowClass that handles window interaction