mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 01:30:16 +01:00
feat(editor): the SRK tool shows the block of each line out of the station and places the SHP resonators: the automatic or the semi-automatic block chosen in a table of the lines, by hand or by the block signals standing along it, a double-track line taking the automatic one, a single-track one the other, kept in the record of the station; the block signals placed only on the lines of the automatic block, the warning discs only on those of the semi-automatic one. The heads checked for their resonators 200 m before an entry signal, a block signal and a warning disc and at an exit signal telling of the next one, 5 m either way, those of the old sceneries found by any event ending with _shp within 100 m; the ones missing placed as rezonator.inc with their events on the tracks the trains run into, at a joint within 5 m, else the track cut, in one step of undo. A signal stands by the track of its read event only when it lies near it, else by the nearest track, so a read event put on a track before the signal no longer shifts its routes
This commit is contained in:
@@ -278,7 +278,8 @@ std::size_t editor_mode::place_templates(std::vector<template_item> const &Items
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> values{"none", number(local.x, 3), number(local.y, 3), number(local.z, 3), number(item.yaw, 2)};
|
||||
auto const name{item.values.find("name")};
|
||||
std::vector<std::string> values{name != item.values.end() ? name->second : std::string{"none"}, number(local.x, 3), number(local.y, 3), number(local.z, 3), number(item.yaw, 2)};
|
||||
values.insert(values.end(), item.rest.begin(), item.rest.end());
|
||||
directive = editor_includes::compose_directive(item.file, values);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user