The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on January 31, 2021, 03:23:37 PM

Title: Convert timeout interval to text
Post by: Yona-TYT on January 31, 2021, 03:23:37 PM
I would like a function that when calling it with an interval for the waiting time, it returns the text in days, hours and minutes.
For example, for the interval "12684" the returned text would be "+5 11:59 pm"
I need to do a lot of tweaking in the tutorial for the new standby system to work.
Title: Re: Convert timeout interval to text
Post by: Yona-TYT on February 04, 2021, 06:35:02 AM
I made a little patch that uses "difftick_to_string" to get the time values I need in the tutorial.
Title: Re: Convert timeout interval to text
Post by: Yona-TYT on February 08, 2021, 08:40:28 AM
This has already been implemented ?. ???
Title: Re: Convert timeout interval to text
Post by: Dwachs on February 11, 2021, 07:22:12 PM
Why do you need such a function?
Title: Re: Convert timeout interval to text
Post by: Yona-TYT on February 12, 2021, 12:41:41 AM
If the error player makes a mistake when configuring the schedule, then it should be told how to configure the wait time (old schedule window) correctly, since this was changed recently.

We already have a function to convert values to currency format, why not add this one too? .
Title: Re: Convert timeout interval to text
Post by: ampersand on March 26, 2021, 04:47:11 PM
Necessary or not reasons:
It took me a couple of months and games to understand waiting time is displayed in fractions of a month. This is not a real life value in any of cultures I know. In contrast to "twice a month", ex.
Title: Re: Convert timeout interval to text
Post by: Dwachs on March 29, 2021, 05:37:39 PM
this is in r9709 now.
Title: Re: Convert timeout interval to text
Post by: Yona-TYT on March 29, 2021, 07:55:38 PM
Thanks <3 .