News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Track renewal info is perhaps not displayed correctly

Started by Matthew, June 13, 2018, 08:43:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

Track renewal does not seem to be working correctly in the nightly from 12 June (#26ed33b).

Steps to reproduce:
1. Open the autosave provided.
2. Go to square (981,249) or thereabouts; anywhere on the main line heading away from Dolingborne Combined Farms Railway Station (Great Plains Railway) into the countryside will do.
3. The track is 70 lb/yard, and has been set to be renewed as 97.5 lb/yard for many years. It says that it was last renewed in December 1912, but it has not upgraded to 97.5 lb. Since says the condition is 19% or so, I do not think it has ever been renewed.

When I originally played through into 1913, the last track renewal date updated to January 1913 sometime that month, but the track remained as 70lb/yard and the condition remained about 15%. However, when I ran the autosave game provided on fast-forward until the beginning of January 1913 in order to check that this could be reproduced, it did not update to January 1913.

Hopefully, this is 'just' a bug with updating the GUI text, rather than the renewal logic.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

Thank you for the report. The problem seems to have been that a recent change incorrectly caused the data as to when a way was last renewed to be reset to the current month when a game was loaded. This would not affect when the ways were actually renewed, but historical data on renewal will have been lost. This will not affect gameplay beyond the loss of interesting information, however.

I have now pushed what I believe is a fix to this, which should be available in the next nightly build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

Thank you, James. If only more problems in life could be fixed with the same rapidity with which you squash Simutrans bugs!
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Matthew

Just looking at the commit, did you intend to put the fix inside this block?:

if(desc->is_mothballed())

I know nothing about C++, but I can't quite follow the logic of putting that in the mothballed section, especially as it's followed by another !from_saved_game check straight afterwards.

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

This is correct, as, previously, the date of degradation was not recorded. However, by pointing this out, you reminded me that I also need to add the relevant line to the subsequent block of code, which I now have done - thank you for checking this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

Good thing you know what you're doing! And now even I can follow the logic.  :)
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。