News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[BUG] The built in date of the factory info dialog is incorrect

Started by Ranran(retired), May 17, 2020, 09:35:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

Built in date on the factory information does not seem to display the correct date.

I think it will be reset when the game is reloaded.
For example, in Bridgewater-Brunel server, most of the factories were built in 1750, but all show February 1751.


ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

I wonder whether these data are actually stored for industries? Perhaps that is why Standard does not have this feature. It may be best for the person who added the "Built in:" text to look into solving this one. It may need an update to the load/save code.
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.

Ranran(retired)

Quote from: jamespetts on May 17, 2020, 11:34:02 AMI wonder whether these data are actually stored for industries?
The factory doesn't seem to have the purchase_time initialized. Each client has a unique construction date, which does not seem to differ from factory to factory.
Try building a factory with the build industry tool. You will find that it has a common date with other factories, not the current date.


EDIT:
I made a change that just commented out it in another patch.
Bring it back if someone make a change that records built in date to the factory.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you for this. You refer to the value being uninitialised; may I ask where in the code that you found this? It may be fairly straightforward to modify this to save the value once its place in the code has been tracked down.
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.

Ranran(retired)


/**
* Construction began at this tick. "Pit" under-construction graphics handled by sync_step()
* @author Hj. Malthaner
*/
sint64 purchase_time;

I don't think the factory makes this correct value change.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

wlindley

The error occurs during a save/load process.

I submitted a pull request for this which is not yet approved. As per my follow-up comment, I see no reason to change the save-file version because difference in meaning of "purchase time" as previously saved is negligible compared to the updated one, and there would be no real point in changing the read-saved-file code to try and adjust for any difference. 
I believe needlessly complicating the version-dependence of the save/load code would be pointless.  If I were to modify that code, I would like to greatly streamline and crash-proof the load code by a more resilient format.

jamespetts

My apologies: I realise that I had forgotten about this. Now incorporated. Thank you.
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.

Ranran(retired)

Quote from: jamespetts on June 03, 2020, 01:04:10 PMMy apologies: I realise that I had forgotten about this. Now incorporated.
It seems that this issue is still unresolved.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)