mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 11:39:14 +01:00
feat(editor): a deleted track leaves its signal reads and its track circuit to the track laid in its place, and the SRK check lists the signals no track reads and the broken lines, with a Repair
A deleted track whose read events or track circuit no other track took says so by the cursor, naming the signals and the circuits, and the editor keeps them for the track laid in its place, within a metre of its axis. The read of each signal goes to the piece by the signal, on the list its facing there gives, so a track laid the other way round keeps the trains reading it; the other events go to the piece at its middle, the circuit to a track lying there for the most part, a new track taking it instead of the one of the track it was made from. It happens in the step which lays the track, so Ctrl+Z takes it back and laying it again gets them again; a track which took a circuit over and is removed by another step leaves it to that step, and the events of a signal taken away stay off the tracks. The SRK panel of a station lists what it and its lines need: signals no track reads, lines broken off where the tracks go on beyond a gap, tracks of a line of the automatic block in no block section, block sections whose tracks are gone. A row shows the place; Repair has the track by each signal read it again, as moving it does, and sets the line signals again where tracks are in no block section. A warning after an operation shows by the cursor in amber, a refusal in red as before. srkcheck counts these too, srkfix repairs, join takes the height of the ends for sceneries far above zero.
This commit is contained in:
@@ -105,6 +105,7 @@ struct standing_signal
|
||||
std::string file; // of its template
|
||||
TTrack *track{nullptr}; // the trains read it on, nullptr while none does
|
||||
int facing{0}; // the trains it faces run 1: towards the end of the path of the track, -1: towards its start, 0 unknown
|
||||
std::string read; // its event the trains read, empty for a template without one
|
||||
};
|
||||
// a signal template as the signalling picks one: the lights it has and the speeds its events show
|
||||
struct signal_head
|
||||
@@ -216,6 +217,8 @@ class editor_signals
|
||||
virtual std::size_t signal_batch(signal_changes const &Changes, std::vector<std::pair<TTrack *, editor_track::state>> States, std::vector<TTrack *> Created, std::string &Error) = 0;
|
||||
// the signal templates with lights, false while they are still being looked for
|
||||
virtual bool signal_heads(std::vector<signal_head> &Heads, bool const Wait) = 0;
|
||||
// the signals given which no track reads, read again by the track they stand by: one step of the history. returns: how many
|
||||
virtual std::size_t signal_reattach(std::vector<scene::instance_handle> const &Instances) = 0;
|
||||
|
||||
protected:
|
||||
~editor_signals() = default;
|
||||
|
||||
Reference in New Issue
Block a user