The International Simutrans Forum

 

Author Topic: way_comstraint_prohibitive only for powered vehicles -- rack railway  (Read 217 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3691
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
I'm considering implementation of rack (cogwheel) railway. The idea is as follows:
- normal track has only half-height slopes
- rack track has also full/double-height slopes, but restricted speed and axle load, and higher costs than normal track.
- way_constraint_prohibitive that will let only engines equipped with cogwheel (or adhesion engines with better brakes) to enter such track

The problem is, that the prohibitive constraint should apply only to engines, not cars. Normal cars (fitting the permitted axle_load), are to be used on such track, so I would like to avoid the need to specify rack_railway as prohibitive constraint on all railway cars. The idea is to have a flag for every prohibitive constraint showing if it applies to all vehicles, or only those that are powered.

Any other idea how this could be achieved?