The International Simutrans Forum

 

Author Topic: [PATCH] Spacing time now counts as loading time.  (Read 2534 times)

0 Members and 1 Guest are viewing this topic.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
[PATCH] Spacing time now counts as loading time.
« on: June 16, 2011, 09:30:50 PM »
https://github.com/inkelyad/simutrans-experimental/tree/spacing_and_loading

Example:

spacing 1 cnv/m , convoy loading time is 00:15

Before patch:
Arrival time: 23:30 -> Departure time: 00:15
Arrival time: 23:55 -> Departure time: 00:15

After patch:
Arrival time: 23:30 -> Departure time: 00:00
Arrival time: 23:55 -> Departure time: 00:10

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [PATCH] Spacing time now counts as loading time.
« Reply #1 on: June 16, 2011, 10:44:13 PM »
Inkelyad,

thank you for this. Apologies for not having had chance to look into this or your other patch yet - I have been very busy this week, unfortunately, and have not had a great deal of time for working on Simutrans. I have been trying to integrate the latest changes from Standard into Experimental, which is a somewhat time-consuming task, and I shall have to complete that before returning to fix the latest set of reported bugs and apply the latest patches.

In the meantime, if anybody would like to test and/or comment on this patch, I should be very grateful. Thank you, Inkelyad, for your contribution.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: [PATCH] Spacing time now counts as loading time.
« Reply #2 on: June 17, 2011, 06:00:50 PM »
EDIT: Oops. I have found logical error in this patch. Don't use it.
« Last Edit: June 18, 2011, 08:15:36 AM by inkelyad »

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: [PATCH] Spacing time now counts as loading time.
« Reply #3 on: June 26, 2011, 12:24:11 PM »
Now, 9.x don't crash instantly. I can publish fix for this patch. Github link

+ It will show tooltip counter while convoy wait for loading.

I was forced to add new variable to convoi_t => savegame format change.

James, please put right versions in simversion.h and line 3205 of simconvoi.cc if you merge this.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [PATCH] Spacing time now counts as loading time.
« Reply #4 on: June 26, 2011, 02:29:55 PM »
Inkelyad,

thank you very much for that. That looks very interesting. As it requires an increment to the major version, it may be a little while before I am able to integrate it (as I tend to like to have several enhancements at once for major version increments), but this does look promising (although I have not evaluated it so far). I do like the look of using a more intelligently formatted expression of time for convoy loading in the depot window, too.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [PATCH] Spacing time now counts as loading time.
« Reply #5 on: July 06, 2011, 10:44:03 PM »
I have now conducted some preliminary testing with this. One comment so far: the tooltip display for showing loading time remaining in seconds is very useful, but it might be clearer to mark it "Loading: 0:13" (etc.), rather than just giving the number.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: [PATCH] Spacing time now counts as loading time.
« Reply #6 on: July 07, 2011, 04:40:58 PM »
One comment so far: the tooltip display for showing loading time remaining in seconds
It is not seconds. It just looks like this when bits_per_month = 19
Quote
but it might be clearer to mark it "Loading: 0:13" (etc.), rather than just giving the number.

Here. Or merge my spacing_as_loading branch.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [PATCH] Spacing time now counts as loading time.
« Reply #7 on: July 07, 2011, 07:44:59 PM »
Thank you for that: that is a good improvement. Might I ask: if the numbers are not minutes and seconds, what do they represent? I suspect that I am missing something obvious in asking that...

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: [PATCH] Spacing time now counts as loading time.
« Reply #8 on: July 08, 2011, 05:01:08 AM »
It is same code as for show_month = 1 ( Month = 24h, no date).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [PATCH] Spacing time now counts as loading time.
« Reply #9 on: July 08, 2011, 09:23:55 AM »
Ahh - doesn't that have the potential to be confusing when players are using a different show_month setting?

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: [PATCH] Spacing time now counts as loading time.
« Reply #10 on: July 08, 2011, 09:58:50 AM »
When player do precise calculations about spacing/waiting time it is better to have stable counter.
(when date involved Jul = 31d = 744h=44640min, Feb=28d=672h=40320min for same number of ticks).
I think they figure it out. For all others players it will be just a counter.