17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 00:17:39 +01:00

Catenary as plain node entries in scenery files

This commit is contained in:
2026-10-26 20:23:26 +01:00
parent d794b1e736
commit e19c788f30
9 changed files with 356 additions and 71 deletions

View File

@@ -583,6 +583,12 @@ state_serializer::deserialize_node( cParser &Input, scene::scratch_data &Scratch
road->create_lanes();
scene::Layers.track( road, { sourcebegin, Input.TokenEnd() } );
}
else if( nodedata.type == "suspension" || nodedata.type == "chain" || nodedata.type == "gantry" || nodedata.type == "anchor" ) {
// the catenary straight in the scenery file: it belongs to the file (layer) it's in, the scenery save writes it there
auto const layer { scene::Layers.handle() };
auto const file { ( layer != null_handle && Input.InLayerFile() ) ? scene::Layers.layer( layer ).name : Input.Name() };
catenary_scene_node( Input, nodedata.type, nodedata.range_max, nodedata.range_min, nodedata.name, file );
}
else if( nodedata.type == "sweep" ) {
auto *sweep { new sweep_node( nodedata ) };