Simutrans Forum Archive
A complete record of the old Simutrans Forum.

way_comstraint_prohibitive only for powered vehicles -- rack railway

Started by Vladki, December 31, 2020, 07:03:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


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?