Editor/Data/ArchWallPreset.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Sandbox;

namespace Sunless.Architecture;

// Carries no geometry - the drag says where, this says how it is finished.
public sealed class ArchWallPreset : IArchWallTreatment {
	public string Name { get; set; } = "wall";
	public float Height { get; set; }
	public float Thickness { get; set; }
	public bool Exterior { get; set; } = true;
	public bool SingleSided { get; set; }
	public bool Baseboard { get; set; } = true;
	public bool Cap { get; set; }
	public float CapHeight { get; set; }
	public float CapOverhang { get; set; }
	public string Cornice { get; set; } = "";
	public WallCladding Cladding { get; set; }
	public bool Wainscot { get; set; }
	public List<ArchWallBand> Bands { get; set; } = new();
	public List<ArchWallTrim> Trims { get; set; } = new();
	public ArchPilasterRun Pilasters { get; set; } = new();
	public ArchOpeningRun OpeningRun { get; set; } = new();

	public ArchWall Spawn( int id, Vector2 start, Vector2 end ) {
		var wall = new ArchWall { Id = id, Start = start, End = end };

		ArchWallTreatments.Dress( this, wall );

		return wall;
	}

	public static ArchWallPreset Copy( ArchWallPreset preset ) {
		var result = new ArchWallPreset { Name = preset?.Name ?? "wall" };

		if ( preset is not null ) {
			ArchWallTreatments.Dress( preset, result );
		}

		return result;
	}
}