From f7254a770909709c60ae46a8f8faee720098b32d Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 5 Oct 2026 23:35:17 +0200 Subject: [PATCH] chore(prototype): street types with overlaid passing lanes (variants A/B) Copy of country_new_small with a 0.5 m passing lane per direction at the centre line, offset +-2.5 into the oncoming lane. A and B use opposite signs because the unit/sign of LaneConfig.offset is unknown. Co-Authored-By: Claude Opus 5.5 --- .../overtake_proto_a.street_template.lua | 41 +++++++++++++++++++ .../overtake_proto_b.street_template.lua | 41 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 mod/content/streets/overtake_proto_a.street_template.lua create mode 100644 mod/content/streets/overtake_proto_b.street_template.lua diff --git a/mod/content/streets/overtake_proto_a.street_template.lua b/mod/content/streets/overtake_proto_a.street_template.lua new file mode 100644 index 0000000..a8695fa --- /dev/null +++ b/mod/content/streets/overtake_proto_a.street_template.lua @@ -0,0 +1,41 @@ +-- PROTOTYPE (ticket "Can a street type with overlaid passing lanes fake overtaking on single-lane roads?"): +-- throwaway, lives only on branch prototype/vehicle-probe. +-- Looks like country_new_small (same style, one visible lane per direction), but each direction gets a narrow +-- extra passing lane at the centre line, pushed by `offset` over the oncoming lane. Variant A: passing-lane +-- offsets B +2.5 / F -2.5 (the unit and sign of LaneConfig.offset are unknown; variants A and B use opposite signs). +function data() +return { + availability = { yearFrom = 0, yearTo = 0 }, + cost = 180, + country = true, + defaultWithCrosswalk = false, + description = { + description = "PROTOTYPE overtaking road, variant A: country small road with overlaid passing lanes (offset B +2.5 / F -2.5).", + icon = "::/infrastructure/street/country/country_new_small.tga", + name = "Overtake proto A (passing lanes B +2.5 / F -2.5)", + previewIcon = "::/infrastructure/street/country/country_new_small_preview.tga", + }, + emissions = { noise = 0, pollution = 0, pollutionRadius = 0, radius = 0 }, + fillGroundTex = "::/infrastructure/street/shared/street_fill.gtex", + laneConfigs = { + { forward = false, height = 0, offset = -1, speed = 22.22, transportModes = { "PERSON", "CARGO" }, width = 2 }, + { forward = false, height = 0, offset = -0.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 5 }, + -- backward passing lane, meant to sit over the forward driving lane + { forward = false, height = 0, offset = 2.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 0.5 }, + -- forward passing lane, meant to sit over the backward (oncoming) driving lane + { forward = true, height = 0, offset = -2.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 0.5 }, + { forward = true, height = 0, offset = 0.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 5 }, + { forward = true, height = 0, offset = 1, speed = 22.22, transportModes = { "PERSON", "CARGO" }, width = 2 }, + }, + maintenanceCost = 30, + menuCategory = { categories = { { category = "roads_country", filterCategories = { }, order = 441 } } }, + modifiers = { maxSpeedModifier = 0, noiseModifier = 0, pollutionModifier = 0 }, + pedestrianWalkPenalty = true, + priority = 200, + roadType = "STREET", + sidewalkFillGroundTex = "::/infrastructure/shared/none.gtex", + simBuildable = false, -- towns must not build the prototype + streetStyle = "::/infrastructure/street/country/country_new_small.street", + builderAudioRes = "::/gui/construction/sound/buildoze_street.builder_audio", + } +end diff --git a/mod/content/streets/overtake_proto_b.street_template.lua b/mod/content/streets/overtake_proto_b.street_template.lua new file mode 100644 index 0000000..70a1cc6 --- /dev/null +++ b/mod/content/streets/overtake_proto_b.street_template.lua @@ -0,0 +1,41 @@ +-- PROTOTYPE (ticket "Can a street type with overlaid passing lanes fake overtaking on single-lane roads?"): +-- throwaway, lives only on branch prototype/vehicle-probe. +-- Looks like country_new_small (same style, one visible lane per direction), but each direction gets a narrow +-- extra passing lane at the centre line, pushed by `offset` over the oncoming lane. Variant B: passing-lane +-- offsets B -2.5 / F +2.5 (the unit and sign of LaneConfig.offset are unknown; variants A and B use opposite signs). +function data() +return { + availability = { yearFrom = 0, yearTo = 0 }, + cost = 180, + country = true, + defaultWithCrosswalk = false, + description = { + description = "PROTOTYPE overtaking road, variant B: country small road with overlaid passing lanes (offset B -2.5 / F +2.5).", + icon = "::/infrastructure/street/country/country_new_small.tga", + name = "Overtake proto B (passing lanes B -2.5 / F +2.5)", + previewIcon = "::/infrastructure/street/country/country_new_small_preview.tga", + }, + emissions = { noise = 0, pollution = 0, pollutionRadius = 0, radius = 0 }, + fillGroundTex = "::/infrastructure/street/shared/street_fill.gtex", + laneConfigs = { + { forward = false, height = 0, offset = -1, speed = 22.22, transportModes = { "PERSON", "CARGO" }, width = 2 }, + { forward = false, height = 0, offset = -0.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 5 }, + -- backward passing lane, meant to sit over the forward driving lane + { forward = false, height = 0, offset = -2.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 0.5 }, + -- forward passing lane, meant to sit over the backward (oncoming) driving lane + { forward = true, height = 0, offset = 2.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 0.5 }, + { forward = true, height = 0, offset = 0.5, speed = 22.22, transportModes = { "CAR", "BUS", "TRUCK" }, width = 5 }, + { forward = true, height = 0, offset = 1, speed = 22.22, transportModes = { "PERSON", "CARGO" }, width = 2 }, + }, + maintenanceCost = 30, + menuCategory = { categories = { { category = "roads_country", filterCategories = { }, order = 442 } } }, + modifiers = { maxSpeedModifier = 0, noiseModifier = 0, pollutionModifier = 0 }, + pedestrianWalkPenalty = true, + priority = 200, + roadType = "STREET", + sidewalkFillGroundTex = "::/infrastructure/shared/none.gtex", + simBuildable = false, -- towns must not build the prototype + streetStyle = "::/infrastructure/street/country/country_new_small.street", + builderAudioRes = "::/gui/construction/sound/buildoze_street.builder_audio", + } +end