OpenTTD

Tasklist

FS#5550 - only first engine in consist gets date_of_last_service updated

Attached to Project: OpenTTD
Opened by George (George) - Tuesday, 14 May 2013, 14:01 GMT
Last edited by Remko Bijker (Rubidium) - Saturday, 13 July 2013, 14:12 GMT
Type Bug
Category Vehicles
Status Closed
Assigned To No-one
Operating System Windows
Severity High
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
  • Vladimir Guryanov (Wowanxm) (2013-07-10)
  • Serg Stepanov (GhostRybinsk) (2013-07-09)
  • George (George) (2013-05-14)
Private No

Details

R25214

[17:46:03] <George> when a train comes into depot, only the first engine gets date_of_last_service updated.
[17:46:55] <George> when a consist is split into vehicles, the other engines have date_of_last_service not updated
[17:47:13] <George> equal to day of build

All the engines in consist should have the date of service updated.

Why is it important.
When all the trains should change a livery after a certain date, it looks very silly when they do a change on the fly (on a speed on over 100km/h). So I decided to change current date check to date of last service. Unfortunately it works only for the front engines, but not the other.
It is possible to check the date of the first engine, but when the train is split into parts (to assemble several smaller trains from one large train), the engines become magically transformed into old one. It looks stupid, because it was updated together with the old front engine.
To fix it the date_of_last_service should be updated for all the engines in consist.
In case date_of_last_service is stored for wagons, it should be updated for them too.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Saturday, 13 July 2013, 14:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r25604
Comment by George (George) - Tuesday, 14 May 2013, 14:15 GMT
same in r25239
Comment by Ingo von Borstel (planetmaker) - Friday, 17 May 2013, 11:44 GMT
Untested yet, this patch services every vehicle in a consist, given that the first is being serviced.
Comment by frosch (frosch) - Friday, 17 May 2013, 15:31 GMT
I guess it should not do that for the aircraft parts. GetEngine will likely return non-sense or crash.

Wrt. the other hunk :p I guess "private" fits better than "hidden".

Loading...