FS#385 - Count Vehicles in Player Station List

Attached to Project: OpenTTD
Opened by Chris Huebsch (chu) - Sunday, 05 November 2006, 09:39 GMT
Last edited by andythenorth (andythenorth) - Wednesday, 16 August 2017, 11:16 GMT
Type Patch
Category Interface
Status Closed
Assigned To andythenorth (andythenorth)
Operating System All
Severity Low
Priority Flash
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch changes the player station list, so it displays the number of vehicles which have that station in its order list.

Technically it uses 5 counters in the station struct, named num_vehicles[5]. These counters get updated, when the StationList is resorted.

In case of an order-change, the station (re)sorting is triggered.

If there is a facility for a certain vehicle type, but not vehicle going to that station, the counter is written as a red zero.

Currently there is norma-font size used. I would prefer tinyfont, but it is almost unreadable.

Patch is attached.
This task depends upon

Closed by  andythenorth (andythenorth)
Wednesday, 16 August 2017, 11:16 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Nice patch, but badly aged. Wolf reviewed this and said that it had multiple code and code style problems. Closing. Thanks.