Editor/Road/ArchFencePart.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;
namespace Sunless.Architecture;
public enum PicketTop {
Pointed,
Flat,
Gothic
}
// What stands between the posts is the Barrier spec.
public sealed class ArchFencePart : IArchCollides, IArchPainted, IArchNamed {
// Overrides the kit for THIS part alone: one wall that needs its exact holes, one tower that needs none.
public ArchCollisionMode? Collision { get; set; }
public int Id { get; set; }
public string Name { get; set; } = "Fence";
public List<ArchCurveNode> Nodes { get; set; } = new();
public bool Closed { get; set; }
public ArchBarrierSpec Barrier { get; set; } = new();
public ArchPalette Palette { get; set; } = new();
// Migration — read by Normalize only.
public List<Vector3> Path { get; set; } = new();
public ArchCurve Curve() => ArchCurve.Of( Nodes, Closed );
}