The International Simutrans Forum

 

Author Topic: Convert timeout interval to text  (Read 593 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Convert timeout interval to text
« 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.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Re: Convert timeout interval to text
« Reply #1 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.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Re: Convert timeout interval to text
« Reply #2 on: February 08, 2021, 08:40:28 AM »
This has already been implemented ?. ???

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4858
  • Languages: EN, DE, AT
Re: Convert timeout interval to text
« Reply #3 on: February 11, 2021, 07:22:12 PM »
Why do you need such a function?

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Re: Convert timeout interval to text
« Reply #4 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? .

Offline ampersand

  • Devotee
  • *
  • Posts: 150
  • Languages: EN, FR, PL
Re: Convert timeout interval to text
« Reply #5 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4858
  • Languages: EN, DE, AT
Re: Convert timeout interval to text
« Reply #6 on: March 29, 2021, 05:37:39 PM »
this is in r9709 now.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1594
    • Simutrans-BLOG
  • Languages: ES
Re: Convert timeout interval to text
« Reply #7 on: March 29, 2021, 07:55:38 PM »
Thanks <3 .