FS#342 - Vehicle-statistics for stations

Attached to Project: OpenTTD
Opened by AsterixMG (AsterixMG) - Sunday, 10 September 2006, 19:48 GMT
Last edited by Remko Bijker (Rubidium) - Wednesday, 09 September 2009, 21:07 GMT
Type Patch
Category Interface
Status Closed
Assigned To Celestar (Celestar)
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch allows the user to view statistics on how many vehicles have visited a station.

It adds a button at the bottom of the station-view-window for opening the statistics-window.
The statistics-window shows either statistics for this and last month or average, minimum, maximum statistics and the number of counted months. This can be toggled by a button in the window.

Further statistics might be added in later patches, as well as statistics for waypoints or if needed depots.
This patch should be ready to be included in trunk.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Wednesday, 09 September 2009, 21:07 GMT
Reason for closing:  Duplicate
Additional comments about closing:  Of  FS#2620 
Comment by AsterixMG (AsterixMG) - Monday, 11 September 2006, 20:52 GMT
Attached is a version that includes saving/loading of the statistics, starting with savegame-version 34.
Note that the savegame-version is *not* increased to 34 by this patch, but it will start save/load whenever the savegame-version is set to 34 or above.

Other than that there is only a small change to how the GUI is drawn.

Waiting for some comments now (especially from the developers). Thanks in advance.
Comment by AsterixMG (AsterixMG) - Thursday, 14 September 2006, 17:22 GMT
New version incorporating changes suggested by Darkvater.

There's one thing I would liek comments on:
STSVehicleType currently uses the same order as the finances-window, not the same order as the vehicle-types in the rest of the code.
Should I leave it as is?
Or change the order in the enum making them display in a different order than in the finances-window?
Or change enum an make a conversion of the order for the displaying?
Comment by Patric Stout (TrueBrain) - Saturday, 18 August 2007, 11:13 GMT
This idea for a patch is in fact rather nice. Too bad it is a bit outdated right now. Would it be possible for you to update it, so we can review it properly?
Comment by AsterixMG (AsterixMG) - Monday, 20 August 2007, 07:10 GMT
I will look at it after new computer arrived and is properly set up, as my current one doesn't work too stable anymore... (should come this or next week)