The International Simutrans Forum

 

Author Topic: [code] Get maximum speed in ways  (Read 782 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1845
    • Simutrans-BLOG
  • Languages: ES
[code] Get maximum speed in ways
« on: June 21, 2020, 07:55:55 AM »


This is in order to know if a way is passable or not, for example rivers that have speed "0" are not passable.  8)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4957
  • Languages: EN, DE, AT
Re: [code] Get maximum speed in ways
« Reply #1 on: June 21, 2020, 10:58:36 AM »
This will give the max speed of the way including the speed limits of crossings, way objects, city roads etc. If you want the speed limit of the way the you can use way.get_desc().get_topspeed()

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1845
    • Simutrans-BLOG
  • Languages: ES
Re: [code] Get maximum speed in ways
« Reply #2 on: June 21, 2020, 12:52:58 PM »
This will give the max speed of the way including the speed limits of crossings, way objects, city roads etc. If you want the speed limit of the way the you can use way.get_desc().get_topspeed()
This can also be very useful, since it is more generalized ;)