The International Simutrans Forum

Development => Extension Requests => Topic started by: Asdfe on October 23, 2016, 08:38:45 PM

Title: Track laying change
Post by: Asdfe on October 23, 2016, 08:38:45 PM
As it stands, track (and other waytype) laying works something like this:

Mode 1: Click and drag without control button. This makes the cheapest path, and does nothing if no path is available.

Mode 2: Click and drag with control button. This makes a direct path, and does nothing if no direct path is available.

This works ok, but can be improved without too much coding (I say with my limited coding knowledge).

My suggestion: Clicking and dragging by default makes a direct path (ie /w Crtl button currently) unless the is no direct path, in which case it swaps over to the cheapest path (ie w/o Crtl button currently).
Title: Re: Track laying change
Post by: prissi on October 24, 2016, 08:44:39 PM
You can enable this in the simuconf.tab. CHange to line with "straight_way_without_control" to 1:
straight_way_without_control = 1

However, what you want is "read my mind". The shortest path is a straight path. Hence the function will built a direct path without control, unless it is not possible. The idea with control is to avoid building unwanted paths.
Title: Re: Track laying change
Post by: Asdfe on October 24, 2016, 11:56:01 PM
I see. Mind reading would be nice, but I can see that it's probably a few decades down the road ;D.