Static editor utility that returns a list of predefined ArchBridgeType instances. It constructs four bridge type templates (Overpass, Flyover, Footbridge, Causeway) with configured ArchBridgePart and ArchBarrierSpec values for use in the editor.
using System.Collections.Generic;
namespace Sunless.Architecture;
// Written out on first use and read back; a file on disk beats this table.
public static class ArchBridgeTypes
{
public static List<ArchBridgeType> Defaults()
{
return new List<ArchBridgeType> { Overpass(), Flyover(), Footbridge(), Causeway() };
}
static ArchBridgeType Overpass()
{
return new ArchBridgeType
{
Name = "overpass",
Title = "Overpass",
Description = "Concrete beam over a dual carriageway - one blade pier in the median, cast upstand, steel guardrail.",
Icon = "linear_scale",
Deck = new ArchBridgePart
{
Slab = 16f,
Girder = 54f,
EdgeBeam = 10f,
Ribs = 4,
BentSpacing = 720f,
Pier = PierStyle.Blade,
PierDepth = 42f,
Batter = 0f,
Headstock = 26f,
Abutments = true,
AbutmentDepth = 84f,
WingWall = 168f,
// Splayed hard - near-parallel would read as walls, not as holding the fill back.
WingSplay = 45f,
Upstand = 15f,
UpstandWidth = 18f,
Parapet = true,
Barrier = new ArchBarrierSpec
{
Style = BarrierStyle.Guardrail,
Ground = BarrierGround.Follow,
Height = 40f,
PanelLength = 144f,
PostSize = 5f,
Rails = 2
}
}
};
}
static ArchBridgeType Flyover()
{
return new ArchBridgeType
{
Name = "flyover",
Title = "Flyover",
Description = "Long freeway ramp on paired round columns, wide spans, cast upstand and guardrail.",
Icon = "trending_up",
Deck = new ArchBridgePart
{
Slab = 16f,
Girder = 66f,
EdgeBeam = 12f,
Ribs = 5,
BentSpacing = 960f,
Pier = PierStyle.Columns,
Columns = 2,
PierWidth = 54f,
PierDepth = 54f,
Batter = 2f,
Headstock = 30f,
Abutments = true,
AbutmentDepth = 96f,
WingWall = 192f,
WingSplay = 42f,
Upstand = 15f,
UpstandWidth = 18f,
Parapet = true,
Barrier = new ArchBarrierSpec
{
Style = BarrierStyle.Guardrail,
Ground = BarrierGround.Follow,
Height = 42f,
PanelLength = 144f,
PostSize = 5f,
Rails = 2
}
}
};
}
// Nothing about it is a road structure - so no headstocks or wing walls.
static ArchBridgeType Footbridge()
{
return new ArchBridgeType
{
Name = "footbridge",
Title = "Footbridge",
Description = "Thin slab over a single central column per span, tube railing, no wing walls.",
Icon = "directions_walk",
Shows = new List<ArchBridgeGroup> { ArchBridgeGroup.Deck, ArchBridgeGroup.Spans, ArchBridgeGroup.Pier, ArchBridgeGroup.Parapet },
Deck = new ArchBridgePart
{
Slab = 9f,
Girder = 20f,
EdgeBeam = 4f,
Ribs = 2,
BentSpacing = 480f,
Pier = PierStyle.Piers,
Columns = 1,
PierWidth = 26f,
PierDepth = 26f,
Batter = 1f,
Headstock = 10f,
Abutments = true,
AbutmentDepth = 36f,
WingWall = 0f,
Upstand = 4f,
UpstandWidth = 6f,
Parapet = true,
Barrier = new ArchBarrierSpec
{
Style = BarrierStyle.PostAndRail,
Ground = BarrierGround.Follow,
Height = 48f,
PanelLength = 96f,
PostSize = 3f,
Rails = 3
}
}
};
}
static ArchBridgeType Causeway()
{
return new ArchBridgeType
{
Name = "causeway",
Title = "Causeway",
Description = "Short spans on rows of stubby piers, low over the water, precast parapet.",
Icon = "waves",
Shows = new List<ArchBridgeGroup> { ArchBridgeGroup.Deck, ArchBridgeGroup.Spans, ArchBridgeGroup.Pier, ArchBridgeGroup.Parapet },
Deck = new ArchBridgePart
{
Slab = 14f,
Girder = 26f,
EdgeBeam = 6f,
Ribs = 2,
BentSpacing = 300f,
Pier = PierStyle.Piers,
Columns = 3,
PierWidth = 30f,
PierDepth = 30f,
Batter = 2f,
Headstock = 16f,
Abutments = true,
AbutmentDepth = 60f,
WingWall = 96f,
WingSplay = 40f,
Upstand = 12f,
UpstandWidth = 14f,
Parapet = true,
Barrier = new ArchBarrierSpec
{
Style = BarrierStyle.PrecastSlab,
Ground = BarrierGround.Level,
Height = 40f,
PanelLength = 120f,
PostSize = 6f,
Courses = 2,
PanelThickness = 4f
}
}
};
}
}