News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Bug in speedbonus.tab with air vs air_wt

Started by maxim13, August 30, 2022, 10:33:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

maxim13

In source code:

// returns a string with the "official name of the waytype"
const char *weg_t::waytype_to_string(waytype_t wt)
{
   switch(wt) {
      case tram_wt:        return "tram_track";
      case track_wt:       return "track";
      case monorail_wt:    return "monorail_track";
      case maglev_wt:      return "maglev_track";
      case narrowgauge_wt: return "narrowgauge_track";
      case road_wt:        return "road";
      case water_wt:       return "water";
      case air_wt:         return "air_wt";
      default:
         // keep compiler happy; should never reach here anyway
         break;
   }
   return "invalid waytype";
}


So if you want correctly set speed bonuses for airline you should write:

air_wt=1925,150,1942,220,1966,400,1978,600,2020,670,2021,790

not

air=1925,150,1942,220,1966,400,1978,600,2020,670,2021,790

Roboron

Hmm, I have taken a look at other paksets and no one use "air_wt". Thus, we should change the source code instead so it returns "air" and not "air_wt".

I have traced back the issue and it seems it was changed in r9208

=> https://github.com/simutrans/simutrans/commit/1554e59ce4

However, that change was not originally in the patch, and was added due to a translation issue as explained here:

=> https://forum.simutrans.com/index.php/topic,18630.msg176880.html#msg176880

So, I have taken TurfIt suggestion and changed the term "Air" to "Aircraft" and "air_wt" back to "air" in r10726. Also changed the objects in Simutranslator.