FS#6423 - re-cache vehicle properties in depot

Attached to Project: OpenTTD
Opened by George (George) - Sunday, 21 February 2016, 20:39 GMT
Type Feature Request
Category Vehicles
Status New
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No



In xUSSR set I use code like this

switch (FEAT_TRAINS, SELF, e_e_power, date_of_last_service >= date(1920,1,1))
0: return get_power_in_cb(1100);
return get_power_in_cb(1306);

It is intended, that when a train visits a depot after specified day, it changes the power to the new value (got automatically upgraded).
Unfortunately, the game changes the power not in depot, but several days later. I suppose, it caches the value and updates the cache while the train is outside depot.
It would be nice, if visiting the depot would force properties recache, guaranteeing that a change happens in depot.
This task depends upon

Comment by George (George) - Sunday, 21 February 2016, 21:36 GMT
related task
/task/6249 - the same for leaving the station
Comment by Peter Nelson (peter1138) - Tuesday, 14 March 2017, 12:45 GMT
I guess this can cause a desync currently. Is it sane to refresh when leaving depots?