Editor/Geometry/ArchGuardStyles.cs
using System;
namespace Sunless.Architecture;
// What edge protection a deck, a balcony or a roof may stand, and the one answer to how a chosen style divides
// the edge it stands on. A railing is bayed because its panels are stock; a parapet is one wall per straight
// stretch, because a wall cut into bays is a wall with joints nothing put there.
public static class ArchGuardStyles {
public static readonly BarrierStyle[] Standing =
{
BarrierStyle.PostAndRail,
BarrierStyle.Picket,
BarrierStyle.Solid
};
public static float Bay( BarrierStyle style, ArchKit kit ) {
return style == BarrierStyle.Solid ? 4096f : MathF.Max( 24f, kit.RoofGuardBay );
}
public static string Icon( BarrierStyle style ) => style switch {
BarrierStyle.Picket => "fence",
BarrierStyle.Solid => "rectangle",
_ => "table_rows"
};
public static string Hint( BarrierStyle style ) => style switch {
BarrierStyle.Picket => "Picket balustrade — newels and boards",
BarrierStyle.Solid => "Solid parapet — one coped wall, no posts",
_ => "Posts and rails"
};
}