News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Convert timeout interval to text

Started by Yona-TYT, January 31, 2021, 03:23:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

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.

Yona-TYT

I made a little patch that uses "difftick_to_string" to get the time values I need in the tutorial.

Yona-TYT


Dwachs

Parsley, sage, rosemary, and maggikraut.

Yona-TYT

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? .

ampersand

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.

Dwachs

Parsley, sage, rosemary, and maggikraut.