Editor/Pillar/ArchPillarType.cs
using System.Collections.Generic;
using Sandbox;

namespace Sunless.Architecture;

public enum ArchPillarGroup {
	Section,
	Footing,
	Ends,
	Span
}

// A pillar with no position yet - no second list of fields to drift.
public sealed class ArchPillarType {
	public int Version { get; set; } = 1;
	public string Name { get; set; } = "pillar";
	public string Title { get; set; } = "Pillar";
	public string Description { get; set; } = "";
	public string Icon { get; set; } = "view_column";

	public ArchPillarPart Column { get; set; } = new();

	// Empty means every group, so a pre-existing type keeps its panel.
	public List<ArchPillarGroup> Shows { get; set; } = new();

	public bool Wants( ArchPillarGroup group ) => Shows.Count == 0 || Shows.Contains( group );

	public ArchPillarPart Standing( Vector2 origin, float baseHeight, float height ) {
		var part = Column.Section();

		part.Type = Name;
		part.Origin = origin;
		part.BaseHeight = baseHeight;
		part.Height = height;

		return part;
	}
}