An editor manifest type for wall modification parts. It specifies kind, UI slot, valid host types, labels, icon glyph, subtool, ordering rank, and computes the layer stage based on whether the part 'Carves'.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Sunless.Architecture;
public sealed class ArchWallModManifest : ArchKindManifest<ArchWallModPart>
{
public override ArchKind Kind => ArchKind.WallMod;
public override string Slot => "Modifiers";
public override IEnumerable<Type> Hosts => new[] { typeof( ArchWall ) };
public override string Label => "Wall detail";
public override string Glyph => ArchIcons.Get( "subtool_wallmod", "view_column" );
public override string Subtool => ArchSubtools.Bool;
public override int IndirectRank => 102;
// A pilaster stands proud and a recess bites in, so the part decides the stage and a bare kind falls to Structure.
public override ArchLayerStage Stage( object payload )
{
return payload is ArchWallModPart modifier && modifier.Carves ? ArchLayerStage.Void : ArchLayerStage.Structure;
}
}