17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 22:49:05 +01:00

feat(editor): the SRK tool checks the lights of the signals against the routes of their trains: the speed of each route through the switches by the radius of their curves and the speed set on them, 40, 60 or 100 km/h, a lower orange light for these with an orange strip for 60 and a green one for 100 as Ie-1 gives them, an upper orange one where the next signal can show stop, the white one of the substitute signal; a signal telling of the next one nearer than the braking distance slows the trains with it at stop, Ie-4 § 8 ust. 5, a W21 for 140. The templates read for the speeds their events show; the signals set get the template of the kind with these lights and the least beyond them, the standing ones fitted so in one step of undo, the template swapped with the name, the plate and the read event kept, a variant leaning the other way only with the same speeds. The braking distance shown with the speed of the main tracks it follows, set by hand in the record of the station and used for the block sections too; the warning discs and the block sections nearer than it marked, the signals that don't fit marked in the schematic and the scenery

This commit is contained in:
maj00r
2026-10-22 16:07:04 +02:00
parent ad0a7e7d62
commit 92552b49cd
10 changed files with 1300 additions and 13 deletions

View File

@@ -68,6 +68,9 @@ bool load(std::string const &File, include_info &Info, std::string &Error);
bool save(std::string const &File, include_info const &Info, std::string &Error);
// highest number of (pN) placeholder used by specified template, 0 if it has none
int parameter_count(std::string const &File);
// the speeds the events of a signal template set it to show, by their SetVelocity: of the signal itself, km/h, -1 the highest
// allowed, 20 the substitute signal. Informs: one of them tells the next signal shows stop. returns: false if the file can't be read
bool signal_speeds(std::string const &File, std::vector<int> &Speeds, bool &Informs);
// sets roles of the parameters whose use in the template makes their meaning clear. roles already set are left alone
void suggest(std::string const &File, include_info &Info);
// true if value of a parameter with specified role is supplied by the editor when the template is placed