Manifest class that defines metadata for the Building arch kind. It specifies kind, UI slot, label, glyph, subtool, child kinds, ranking and returns the buildings collection when filed with a plan.
using System;
using System.Collections.Generic;
namespace Sunless.Architecture;
public sealed class ArchBuildingManifest : ArchKindManifest<ArchBuilding>
{
public override ArchKind Kind => ArchKind.Building;
public override string Slot => "Units";
public override string Label => "Building";
public override string Glyph => ArchIcons.Get( "subtool_building", "domain" );
public override string Subtool => ArchSubtools.Building;
public override bool RootsAtPlan => true;
public override string HostOutput => "Building frame and bounds";
public override IEnumerable<ArchKind> Children => new[]
{
ArchKind.Room, ArchKind.Roof, ArchKind.Platform, ArchKind.Porch,
ArchKind.Approach, ArchKind.Downpipe, ArchKind.Fence, ArchKind.Ladder,
ArchKind.Balcony, ArchKind.ExteriorStair,
ArchKind.Pipe, ArchKind.Bracket,
ArchKind.Cut
};
public override int IndirectRank => 110;
public override IEnumerable<object> Filed( ArchPlan plan, object host )
{
if ( plan is null || host is not null )
{
return Array.Empty<object>();
}
return plan.Buildings;
}
}