Editor/Wall/ArchTrimPart.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;

namespace Sunless.Architecture;

public sealed class ArchTrimPart : 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; } = "Trim";
	public string Profile { get; set; } = "gutter";
	public ArchSurface Surface { get; set; } = ArchSurface.Trim;
	public List<Vector3> Path { get; set; } = new();
	public bool Closed { get; set; }
	public float Roll { get; set; }
	// The layer whose outline this run takes as its path - a cut, a room, a platform, a roof. Re-read on
	// every commit, so dragging that layer drags the run round it. Zero means the path was drawn by hand.
	public int FollowsId { get; set; }
	// Which of a multi-legged host's loops this run takes, so a stepped cut can carry a run per leg.
	public int FollowsLoop { get; set; }
	// How far above the followed shape the run sits, dragged on the part rather than typed as a count.
	public float Lift { get; set; }
	// Which elements the run is allowed to dress - the floor edge, the jambs of the walls its host opened,
	// or both as one continuous moulding.
	public ArchTrimReach Reach { get; set; } = ArchTrimReach.Both;

	public bool Follows => FollowsId != 0;

	public ArchPalette Palette { get; set; } = new();
}