17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-26 20:34:54 +01:00
Commit Graph

3567 Commits

Author SHA1 Message Date
maj00r
336c940c28 fix(editor): laying leaves the terrain as it is: the track takes from the ground only the heights of the points clicked, from point to point by default, and no formation is led into the terrain after it, nor after a track dragged from a free end; the terrain made from the model never makes a chunk there is anew, made from the model or by hand, edited or not, only the missing ones, the formations laid anew as the tracks lie
The terrain under the tracks and the end of Tracks onto the terrain took every chunk along the tracks away and made it again from the model, the changes made by hand with them (79 chunks on test2). The heights while laying are kept under a key of their own, so the fitted ones chosen when they were the default are left behind; fitted stays a choice.
2026-10-24 18:20:22 +02:00
maj00r
da336b9530 fix(editor): the orthophoto which comes before the terrain under it lies where the terrain will be, at the heights of the terrain model with the offset of the scenery, or level with the tiles beside along its edges, not flat at the height of the layer far below; the squares of the model asked for, and the tile laid onto the terrain or the model once either comes
mapstate logs how many tiles lie on the ground and how many at guessed heights.
2026-10-24 18:13:15 +02:00
maj00r
e322947300 fix(editor): the track shown while it's laid over the ground no longer holds up the frames: its grade line is fitted on a thread of its own, the line fitted a moment ago stretched over the track meanwhile, and the click takes the line fitted for the same ground instead of fitting it again; the terrain follows the tracks once the laying ends, not after each click of a chain
Fitting the grade line took 3 ms for 250 m of track, 30 ms for 1 km, 65 ms for 2 km and 200 ms for 4 km, and the preview of the lay tool and of the drag from a free end fitted it every frame, twice for the drag; on the terrain model the preview of some 800 m took 10 to 17 ms a frame, the cursor standing or not. Now the frame waits under 1.5 ms for 4 km. The formations of the tracks led into the terrain went through every chunk under them 0.3 s after each click, some 50 ms, while the cursor went on to the next point; they wait for the laying to end. The tracks laid and the terrain are the same as before.

Selftests: perf logs the longest frame and those over 33 ms, fittime the time of the fit by length, terrainhash a hash of the chunks in memory.
2026-10-24 18:00:21 +02:00
maj00r
e35487f767 fix(editor): the map of the scenery wizard north up from its first image: the thread loading it keeps the north edge in the first row, not flipped or not as the texture loader left stb by then 2026-10-24 17:25:26 +02:00
maj00r
36904c2815 feat(editor): buttons in the switch tool setting a model of timbers on all the switches and crossings of the scenery at once, one for each model of timbers of the scenery data and one for the model of eu07.ini, in one step of the undo; the selftest switchtimbers does the same
(cherry picked from commit 81a6b855d0)
2026-10-24 16:33:41 +02:00
a83d5c6978 feat(editor): presets of the track properties, applied on the selected tracks
(cherry picked from commit 83c8c23c80)
2026-10-24 16:33:24 +02:00
7e284b293d feat(editor): texture of the rails of path 2 of a switch set apart
(cherry picked from commit 16c77ab6fb)
2026-10-24 16:32:35 +02:00
maj00r
4d2f95aa43 feat(editor): the tracks laid on the terrain model go onto it as the tracks going onto the terrain do, the chain laid since the laying began fitted again at each click, with the tracks around kept and met; a straight or an arc cut by the fit before made one again, a path cut only where it would part from the line by more than 3 cm; a choice of the heights while laying: fitted, from point to point, level, kept in the settings; the fit taken back with its click 2026-10-23 15:55:58 +02:00
maj00r
7c0b3bc858 feat(editor): all the labels of the tracks in the top view, the straights with their lengths too; one which would cover another or the tracks moved out to the nearest free room, a line leading back to its track 2026-10-23 15:22:17 +02:00
maj00r
5e846018b6 feat(editor): far out the top view shows the base map of OpenStreetMap from geoportal.gov.pl in place of the imagery, tiles as large as the view needs, the ground not drawn under it nor streamed as far as the view; the tracks over it in the colour of the rails, blue by default, and the joints of the pieces left out far out 2026-10-23 13:35:07 +02:00
maj00r
a892532fda feat(editor): the top view draws the tracks whole, without the ballast or the rails alone, in a colour of their own over the imagery and the map: both rails close up, one line further out; a choice by the extent and in the View menu, kept in the settings 2026-10-23 13:20:06 +02:00
maj00r
fe3dd758ea feat(editor): the signalling, the hectometre posts and the terrain go to layers of their own: <scenery>_srk.scm, _hektometry.scm, _teren.scm, made by the first of them and included by the scenario file, the active layer left as it is; the station descriptions of the signalling there too 2026-10-23 13:07:14 +02:00
maj00r
d14b4534ee feat(editor): the station schematic generalized: each station track on a row of its own, the stretches between the switches shortened, the connections slanted between the rows, the signals and the useful lengths on the drawn tracks 2026-10-23 12:51:58 +02:00
maj00r
eab3dca700 feat(editor): the Signals tool goes into the signalling one: its templates under Signals in the SRK panel, the ones the station's signals are placed with too; a click on a tile or Place by a track arms placing, Esc or a click on the armed tile stops it, a click on a track else opening its station; a signal picked in 3D or in Signal heads shows its card at the top of the panel, its template, to the other side, turn around; H no longer a tool 2026-10-23 12:26:07 +02:00
maj00r
2d9be3ae10 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.
2026-10-22 22:40:01 +02:00
maj00r
de61cf05db test(editor): the orthophoto selftest takes the height of the layer, for sceneries far above zero 2026-10-22 21:53:41 +02:00
maj00r
c024d7c262 feat(editor): the signals and the signs by a track go with it as the Plan lays it anew, square to the line, not along it
A curve laid anew, its radius changed or made compound, or a straight moved: the paths of the chain are cut again where their joints stood, set square onto the new line, each keeping its stretch of the ground, so their events, their track circuits and the cuts of the block sections stay where they were instead of being handed on along the line; the parts between the switches alike, the old even sharing kept where the joints don't follow one another along the new line.

The objects by a track taken for a change go with it by themselves: the signals and the warning discs it or its run reads, the SHP resonators by their events, and the controls of the block sections, the hectometre posts, the W17 markers and the other signs by the track nearest to them, within 12 m. They move square to the new axis keeping their offset and their turn, an object moved by hand meanwhile staying where it was put. Such a binding isn't kept in the scenery nor shown among the bound objects of the infra tool, which can still bind the object for good, and the undo and the redo take the objects back and forth with the tracks. The status of the Plan tells how many objects moved with the tracks. A path taking an object over the other way round keeps it on its side, turned as it was.
2026-10-22 21:32:34 +02:00
maj00r
4c55951d8a feat(editor): the automatic block both ways or mixed, and the lines out on the schematic
A block boundary of a line both ways has, on each track, the block signal of its trains 15 m before the joint and the one of the wrong-track trains 15 m beyond it, named after its twin with N, both on the outside of the line, the templates leaning the other way picked for the N ones, as on the lines of PKP PLK. The mixed block keeps the automatic block for the trains of the track and the semi-automatic one for the wrong-track ones: no N signals, a warning disc the braking distance before the entry signal of the wrong-track trains. A choice under the table of the lines sets either for the double-track lines of the station, kept in the record of the station, and by itself a line takes the mixed block where a warning disc stands for its wrong-track trains and no N signal does. Set the line signals places the N signals or the warning disc and takes the other away, a block boundary drawn places the N signals of a line both ways, and sbl_odstep.inc switches both block signals of a section with its 7th parameter. The name shown at the mouse while drawing takes the letter the block signal will get where its number stands already.

The station schematic shows the lines out to the next stations straightened: their block sections in the colours of their names with their lengths, the joints, the block signals and the warning discs with their km on the outside of the line, the axis in km; Lines fits them in, a section under the mouse tells its name, length and km, and a click on it flies there in the 3d view.
2026-10-22 20:47:52 +02:00
maj00r
d090e93c81 fix(editor): a block boundary drawn places its signal across only where the other track runs near, the hover and the click count the block signals facing the trains alike, an SHP resonator at a joint finds the piece of a track cut for another one, and a batch of signals missing its template changes nothing but the tracks cut, Ctrl+Z taking them back; the km of each line kept for the hover, the shorter block section named in its warning, the block column wider 2026-10-22 19:51:55 +02:00
maj00r
c7fecc011e test(editor): selftests draw the block boundaries, srkboundary clicking at a block signal standing, and check the block sections of the scenery; the monkey opens the SRK tool too 2026-10-22 19:33:57 +02:00
maj00r
a3e1624caf feat(editor): the lines out of a station take the automatic block of 3 or 4 aspects, the block sections no shorter than the braking distance or than half of it, the block signals placed with the templates of the aspects and those standing swapped for them; block boundaries drawn by hand, a click on a track of a line of the automatic block placing block signals across both tracks there, numbered after the hectometre, the tracks cut beyond them and the block sections named and switched anew, a click on one standing taking its signals and the switching of their sections away, a step of undo each, the lengths of the sections either side shown at the mouse. A line whose block signals stand keeps them as they stand, Set the line signals placing them evenly only on a line without any, and one whose block signals no block section of the editor switches keeps the block of the scenery untouched; the signals of the other block left along a line taken away, but where it shares its track with a line of that block, and the switching of the sections gone from the lines set with them. A block signal of 4 aspects is checked for a section no shorter than half the braking distance, and fitted with templates of its aspects only 2026-10-22 19:26:26 +02:00
maj00r
b92d1283ac feat(editor): a block signal template knows its aspects, 4 where its events give S3, the green light flashing with the next signal at S5, else 3; one step of the signalling takes includes away too, the signals among them with their read events, Ctrl+Z bringing them back with the rest of it 2026-10-22 19:26:25 +02:00
maj00r
fc0b9b46e8 feat(editor): the table of the lines out of a station marks the signals of the other block left standing along a line, warning discs on one of the automatic block, block signals on one of the semi-automatic one, a click flying to the first of them 2026-10-22 19:06:52 +02:00
maj00r
9ea3628661 refactor(editor): the SRK tool judges the SHP resonator of a signal in one place, missing, beyond the tracks, off its place or placed, and picks the place of a resonator, a joint or a cut, apart from placing it; the nearest point of a track to a signal found coarsely and narrowed down rather than by up to 4000 points. A resonator whose event would land away from its place, the track not cut there, is left out with a note, and the status after a failed placing tells Ctrl+Z takes the cuts back; the lines out of a station emptied while the signal templates are looked for, the layout of the station read only once it's known open 2026-10-22 19:06:49 +02:00
maj00r
fc6d1158bd 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 2026-10-22 18:55:21 +02:00
maj00r
edb4f7c60d feat(editor): the panel of a signal picked swaps its template for another of its kind and mount, the name, the plate, the place and the read event kept, a head leaning to one side for its counterpart leaning towards the track; one step of undo, the selftest signalswap 2026-10-22 18:55:13 +02:00
maj00r
9c124b23bb refactor(editor): a signal head tells the next one shows stop by its chambers alone, an orange light above the red one, not by the events of its template reading the next signal, which the templates of the old sceneries lack 2026-10-22 18:54:54 +02:00
maj00r
a811486b53 fix(editor): the pin of the signal under the mouse in the list of the signal heads stands over its name, clear of its lamps; the routes name the switches they turn off the straight at, a plural for several, and the Polish of the tooltip reads plainer 2026-10-22 17:55:05 +02:00
maj00r
cbbf373aab fix(editor): the templates of the signals swapped or placed without a track changed are a step of the history of their own: they went into the step before, the block signals set say, undone with it, and the SRK tool, missing a new step, kept showing the lights as they were 2026-10-22 17:55:05 +02:00
maj00r
92552b49cd 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 2026-10-22 16:07:04 +02:00
maj00r
ad0a7e7d62 fix(editor): the records of the stations, the switches, the alignments and the kilometrage stay out of a _ter.scm too, as out of a .txtf: with the .sbt of the scenery the file loads as terrain, isn't written back and the changes kept there were lost 2026-10-22 16:06:37 +02:00
maj00r
2452c1cd0d fix(editor): the tools see each change of the history by a revision of it, not by its size, which stood still once the oldest steps were dropped at the limit of 200 and came back to the same after an undo and another change: the SRK schematic, the lineside lists, the gauge, the joints, the speeds and the parallel track missed them 2026-10-22 16:06:25 +02:00
maj00r
43346b61e7 feat(editor): the SRK tool measures the station tracks: the construction length and the useful one each way, as the rozporządzenie on the railway structures (Dz.U. 2026 poz. 1225) § 2 defines it, from the signal the trains stop by back to the joint, the fouling point or the level crossing behind them, between those where no signal stands; the switches within a track part it into stretches. A list in the panel with the longest train, the two ways marked where they differ, the track under the mouse or selected drawn in the schematic and the scenery, the list copied as a table 2026-10-22 15:24:02 +02:00
maj00r
1f8a477ec4 fix(editor): the exit signals of a station track stand at the ends of its longest circuit, for the longest useful length both ways as Ie-4 § 13 ust. 8 wants, not at the outer ends of the outermost long circuits, which left the trains of one way a short stretch beyond a switch within the track 2026-10-22 15:24:02 +02:00
maj00r
a217c9ba75 fix(editor): the hectometre posts write the km at the point on a line of its own under the kilometrage of the line, the wrapped text broke the number at its comma 2026-10-22 14:42:42 +02:00
maj00r
192dfd2035 feat(editor): the signalling mode takes the km of the station and of the block signals from the kilometrage of the line where the Kilometrage tool sets it, jumps included, the way the km rise from its axis, the line of each line out at a junction too, the station of a line set there without typing its number 2026-10-22 14:33:18 +02:00
maj00r
435b80eb55 feat(editor): the hectometre posts go by the kilometrage of the line where the Kilometrage tool sets it, its jumps too, a post at a jump of the km on from it or of the km it is reached at, the km given at the point still there as a choice; the posts standing go with the place of their number nearest to them 2026-10-22 14:33:18 +02:00
maj00r
7cc8e5bb9a feat(editor): the kilometrage tool leads a line through a station along the tracks chosen, the straight paths of the switches by default, from the track chosen on along them until the line meets its tracks again or on and away at a junction, kept as //$k via lines; a track beside that comes back onto the line between the stretches it runs beside it or both ways is a track of a station, not the other track of a double-track line 2026-10-22 14:16:42 +02:00
maj00r
5ecb6ebe00 feat(editor): the kilometrage tool sets the km of the railway lines, points where the km is known and jumps of the km, the rest along the axis of the line, between the tracks of a double-track one and along the longer track where they run apart, kept in the scenery as //$k lines
The track mode Kilometrage (X, under More) puts a point of the km where a track is clicked: the line, the km and, at a jump,
the km on from it. The axis of a line follows the main paths of the switches through the tracks of its points; on a
double-track line it runs between the tracks, and where they part on formations of their own and come together again it
runs along the longer one, the shorter one going by its own length with its last hectometre before they meet taking up
the difference (PKP GK-1 6.1.12). The km between the points are stretched to the length of the scenery evenly; the panel
lists the points with the stretch, the 3D view shows the axis, a tick at each hectometre, the points with their km and
the km of the lines by the mouse. Read the km from the posts turns the hectometre posts along the line into the points
of its km, a jump where two runs of numbers meet, and warns of a jump on a curve or at a station (Id-1 § 19). Each change
is a step of undo.
2026-10-22 13:27:37 +02:00
maj00r
8fde4dc843 fix(editor): the readout of a straight dragged beside another one writes the arrow as ->, the font of the interface has no arrows and showed a question mark 2026-10-22 13:27:29 +02:00
maj00r
f287ecf840 fix(editor): the signalling mode places the joints and the signals as Ie-4 gives them, a branch joint 4.2 m beyond the fouling point, the joint a main signal drops at 15 m beyond it, the block sections no shorter than the braking distance of the line and the warning discs that far out
The block signals are numbered after the nearest hectometre of their parity ahead of them, and two signals no longer take one spot between the tracks.
2026-10-22 12:34:53 +02:00
maj00r
2b40a36173 feat(editor): the switch numbering of the signalling mode renames the switch in the objects of the scenery naming it, as the lanterns of the switches 2026-10-22 12:13:22 +02:00
maj00r
46e665c468 feat(editor): the signalling mode sets the signals of the lines out of a station, the automatic block signals and the block sections to the next station on a double-track line, a warning disc before the entry signal on a single-track one
The station keeps its km and the direction of its numbering in its record. The block signals are named after their km, odd on track 1 and even on track 2, the sections after the signals at their ends, and each signal gets the control of its section.
2026-10-22 12:13:22 +02:00
maj00r
e230544987 feat(editor): the signalling mode names the signals in the scenery above their lamps, the names shown within 700 m only, and draws the track circuits wider in the top view 2026-10-22 11:40:38 +02:00
maj00r
c50d412bc4 feat(editor): the signalling mode shows the track circuits in the scenery, the tracks in their colours, a bar across them with a post at each joint and the names of the station tracks 2026-10-22 11:21:59 +02:00
maj00r
8f8a1518b7 feat(editor): the signalling mode places the signals of a station and names them as PKP PLK does, the entry ones out on the lines with the circuits before them, the exit ones at the ends of the station tracks, the shunting ones at the shorter tracks, and renames the signals standing in their places 2026-10-22 11:07:58 +02:00
maj00r
21d7a0e94a fix(editor): a track with its track circuits changed is marked for the save, the circuits the signalling mode set without cutting the track were lost from the saved scenery 2026-10-22 11:07:58 +02:00
maj00r
f5d2ae7569 feat(editor): the signalling mode numbers a station track as a whole through the switches along it, keeps the numbers the tracks have when set again, renumbers the selected track and labels the schematic without one label over another 2026-10-22 10:41:11 +02:00
maj00r
c8f3039a8c feat(editor): the signalling mode cuts a station at the joints of its track circuits and names them, a circuit for each switch and one for each stretch of a station track, the tracks numbered as PKP PLK does 2026-10-22 08:16:39 +02:00
maj00r
5044beb380 feat(editor): the signalling mode numbers the switches of a station along it and names them after its code, the drives and the switch records follow, and an undo of names passed round among the tracks leaves the drives right 2026-10-22 07:50:59 +02:00