18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-29 16:02:13 +01:00

test(scenarios): the buckle cases run with physics.derailment new (#423)

* test(scenarios): the buckle cases run with physics.derailment new

eu07_td_buckle_derails waits for the "derailed on buckled track" line, which only the criteria
of physics.derailment new write. It was written with new as the default; since monitor is the
default (0645096e) the criteria only log "derailment monitor: ... overturned at 46 km/h on track
tdo_n222" and the train runs on to Przystanek, so the case failed. The case sets the mode itself
now. eu07_td_buckle_event sets it too: under monitor its "no Bad driving" check said nothing
about the criteria.

* docs(scenarios): the buckle cases and the derailment mode they set
This commit is contained in:
jerrrrycho
2026-11-25 05:11:07 +01:00
committed by GitHub
parent f15ea40575
commit 3c3c773ff4
3 changed files with 13 additions and 4 deletions

View File

@@ -278,6 +278,15 @@ pushed, runs onto `tor1k` (`eventall2`), with the train still moving, and the bl
locomotive coupled to the coaches (it couples about 70 s after the start). A driver that leaves its
hand brake on under Connect pulls against it for good and the case ends as a standstill after 300 s.
The `eu07_td_buckle_*` cases (fragment `td_buckle_event.scn`) run the timetable train of
`td_timetable.scn` and buckle the curve `tdo_n222`, about 950 m ahead of it, with a `trackbuckle`
event of `vars.amplitude` at 10:35. Both have `physics.derailment new` in `ini`: the default,
`monitor`, leaves the decision to the legacy draw and only logs what the criteria would do
(`derailment monitor: ... overturned at 46 km/h on track tdo_n222`), so the train runs on to
Przystanek whatever the buckle. With 600 mm over a main lobe of 8 m the locomotive overturns on
the buckle at 46 km/h, 1036 m from the start (`Bad driving: ... derailed on buckled track`); with
30 mm it keeps on the rails and stops at Przystanek after 1400 m.
The `*_td_crew_*` cases (eu07/maszyna#510, fragment `td_crew.scn`) are about the crew command of a
`putvalues` event, `Crew:<vehicle> <cab> <flags>`: cab 1 or -1 puts an AI driver in cab A or B of
the vehicle named, 0 takes its AI driver off. The vehicle is named in the text, so the events are

View File

@@ -1,5 +1,5 @@
{
"description": "EU07 on td.scn on the td/rozklad timetable; at 10:35, as it leaves, the curve tdo_n222 about 950 m ahead buckles hard with a trackbuckle event: 600 mm out of the curve over a main lobe of 8 m (an equivalent radius of 9 m, about 30 m for the body on axles 11 m apart). The AI doesn't see it and runs into it at the 46 km/h it has there: the locomotive leaves the rails on the buckle and stops short of Przystanek.",
"description": "EU07 on td.scn on the td/rozklad timetable; at 10:35, as it leaves, the curve tdo_n222 about 950 m ahead buckles hard with a trackbuckle event: 600 mm out of the curve over a main lobe of 8 m (an equivalent radius of 9 m, about 30 m for the body on axles 11 m apart). The AI doesn't see it and runs into it at the 46 km/h it has there: with physics.derailment new (the default, monitor, only logs what the criteria would do and the train runs on) the locomotive leaves the rails on the buckle and stops short of Przystanek.",
"base_scenery": "td.scn",
"time": "10:34",
"fragment": "td_buckle_event.scn",
@@ -7,7 +7,7 @@
"consist": "node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic",
"amplitude": "600 8"
},
"ini": ["gfxrenderer null"],
"ini": ["gfxrenderer null", "physics.derailment new"],
"duration": 240,
"timeout": 600,
"checks": [

View File

@@ -1,5 +1,5 @@
{
"description": "EU07 on td.scn on the td/rozklad timetable; at 10:35, as it leaves, the curve tdo_n222 about 950 m ahead buckles with a trackbuckle event (30 mm out of the curve, as the heat does: an equivalent radius of 330 m, too little to derail it). The track is laid again during the game and the train keeps on it to Przystanek.",
"description": "EU07 on td.scn on the td/rozklad timetable; at 10:35, as it leaves, the curve tdo_n222 about 950 m ahead buckles with a trackbuckle event (30 mm out of the curve, as the heat does: an equivalent radius of 330 m, too little to derail it). The track is laid again during the game and the train keeps on it to Przystanek, with physics.derailment new: the criteria decide, as in eu07_td_buckle_derails.",
"base_scenery": "td.scn",
"time": "10:34",
"fragment": "td_buckle_event.scn",
@@ -7,7 +7,7 @@
"consist": "node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic",
"amplitude": "30"
},
"ini": ["gfxrenderer null"],
"ini": ["gfxrenderer null", "physics.derailment new"],
"duration": 240,
"timeout": 600,
"checks": [