Cotton code
370 lines · 11.6 KB · SwiftRaw
// Generated by scripts/gen-faces-registry.py from the face files — never edit// by hand: add a face file under its app's folder and run `pnpm gen:faces`.import CottonValuespublic enum FaceRegistry {    /// Every face this build draws, by id.    @MainActor public static let all: [Face] = [        AccountStatementFaceCatalogue.face,        AlbumBoardFaceCatalogue.face,        AlbumCarouselFaceCatalogue.face,        AlbumSleeveFaceCatalogue.face,        AlbumTrayFaceCatalogue.face,        ArtifactFaceCatalogue.face,        ArtistDividerFaceCatalogue.face,        AudioFaceCatalogue.face,        BirthdayFaceCatalogue.face,        BookHardbackFaceCatalogue.face,        CallSlipFaceCatalogue.face,        StoryCharacterCardFaceCatalogue.face,        TodayFaceCatalogue.face,        ToolFaceCatalogue.face,        DocumentFaceCatalogue.face,        EmailFaceCatalogue.face,        EpisodeFaceCatalogue.face,        EpisodeLobbyFaceCatalogue.face,        EventFaceCatalogue.face,        EventRolodexFaceCatalogue.face,        FilmPosterFaceCatalogue.face,        FilmVHSFaceCatalogue.face,        GroupFaceCatalogue.face,        HealthPedometerFaceCatalogue.face,        HealthStopwatchFaceCatalogue.face,        HealthTagFaceCatalogue.face,        HighlightPassageFaceCatalogue.face,        JournalDiaryFaceCatalogue.face,        ListCassetteFaceCatalogue.face,        MachineFaceCatalogue.face,        MemoryFaceCatalogue.face,        MoodFaceCatalogue.face,        MusicAlbumFaceCatalogue.face,        PlaylistFaceCatalogue.face,        KitchenCateringFaceCatalogue.face,        KitchenChefFaceCatalogue.face,        KitchenDeliveryFaceCatalogue.face,        KitchenDishFaceCatalogue.face,        KitchenPlaceFaceCatalogue.face,        KitchenPlanFaceCatalogue.face,        StoryNoteCardFaceCatalogue.face,        NotePageFaceCatalogue.face,        PageClippingFaceCatalogue.face,        PasskeyCardFaceCatalogue.face,        PersonFileFaceCatalogue.face,        PassportFaceCatalogue.face,        RolodexFaceCatalogue.face,        PersonTelephoneFaceCatalogue.face,        PhotoPrintFaceCatalogue.face,        StoryPlaceCardFaceCatalogue.face,        PlainFaceCatalogue.face,        DishFaceCatalogue.face,        PodcastRadioFaceCatalogue.face,        QuotaFaceCatalogue.face,        StorySceneCardFaceCatalogue.face,        StorySceneChatFaceCatalogue.face,        SeasonCardFaceCatalogue.face,        SecretFaceCatalogue.face,        SessionFaceCatalogue.face,        ClassFaceCatalogue.face,        ClientFaceCatalogue.face,        MembershipFaceCatalogue.face,        StudioPlaceFaceCatalogue.face,        TrainerFaceCatalogue.face,        SongAmpFaceCatalogue.face,        SongCassetteFaceCatalogue.face,        SongHifiFaceCatalogue.face,        SongPartyFaceCatalogue.face,        SongSingleFaceCatalogue.face,        SongTrayFaceCatalogue.face,        SongTurntableFaceCatalogue.face,        StoryCardFaceCatalogue.face,        SubscriptionFaceCatalogue.face,        ThreadSlipsFaceCatalogue.face,        TodoCardFaceCatalogue.face,        TrackFaceCatalogue.face,        TransactionChequeFaceCatalogue.face,        TransactionReceiptFaceCatalogue.face,        UnlockCardFaceCatalogue.face,        VideoFaceCatalogue.face,    ]    /// The id of every face in `all`, read off the main actor: whether this    /// build draws a kit's face is asked where no face is drawn.    public static let ids: Set<String> = [        "account.statement",        "album.board",        "album.carousel",        "album.sleeve",        "album.tray",        "artifact",        "artist.divider",        "audio",        "birthday",        "book.hardback",        "call.slip",        "character.card",        "cotton.today",        "cotton.tool",        "document",        "email",        "episode",        "episode.lobby",        "event",        "event.rolodex",        "film.poster",        "film.vhs",        "group",        "health.pedometer",        "health.stopwatch",        "health.tag",        "highlight.passage",        "journal.diary",        "list.cassette",        "machine",        "memory",        "mood",        "music.album",        "music.playlist",        "nancy.catering",        "nancy.chef",        "nancy.delivery",        "nancy.dish",        "nancy.place",        "nancy.plan",        "note.card",        "note.page",        "page.clipping",        "passkey.card",        "person.file",        "person.passport",        "person.rolodex",        "person.telephone",        "photo.print",        "place.card",        "plain",        "plain.dish",        "podcast.radio",        "quota",        "scene.card",        "scene.chat",        "season.card",        "secret",        "session",        "sharmila.class",        "sharmila.client",        "sharmila.membership",        "sharmila.studio",        "sharmila.trainer",        "song.amp",        "song.cassette",        "song.hifi",        "song.party",        "song.single",        "song.tray",        "song.turntable",        "story.card",        "subscription",        "thread.slips",        "todo.card",        "track",        "transaction.cheque",        "transaction.receipt",        "unlock.card",        "video",    ]    /// The stock the face a kit names by `id` is printed on, as its file    /// declares it (`static let stock`), or nil when this build has no face    /// by that id: whatever stacks a card lays the sheets under it from    /// here, before the card is drawn.    public static func stock(_ id: String) -> FaceStock? {        stocks[id]    }    private static let stocks: [String: FaceStock] = [        "account.statement": .own,        "album.board": .own,        "album.carousel": .own,        "album.sleeve": .own,        "album.tray": .own,        "artifact": .framed,        "artist.divider": .own,        "audio": .framed,        "birthday": .cream,        "book.hardback": .own,        "call.slip": .own,        "character.card": .own,        "cotton.today": .framed,        "cotton.tool": .framed,        "document": .framed,        "email": .framed,        "episode": .cream,        "episode.lobby": .own,        "event": .framed,        "event.rolodex": .own,        "film.poster": .own,        "film.vhs": .own,        "group": .cream,        "health.pedometer": .own,        "health.stopwatch": .own,        "health.tag": .own,        "highlight.passage": .own,        "journal.diary": .own,        "list.cassette": .own,        "machine": .framed,        "memory": .framed,        "mood": .framed,        "music.album": .cream,        "music.playlist": .cream,        "nancy.catering": .framed,        "nancy.chef": .framed,        "nancy.delivery": .framed,        "nancy.dish": .framed,        "nancy.place": .framed,        "nancy.plan": .framed,        "note.card": .own,        "note.page": .own,        "page.clipping": .own,        "passkey.card": .framed,        "person.file": .own,        "person.passport": .own,        "person.rolodex": .own,        "person.telephone": .own,        "photo.print": .own,        "place.card": .own,        "plain": .framed,        "plain.dish": .framed,        "podcast.radio": .own,        "quota": .framed,        "scene.card": .own,        "scene.chat": .own,        "season.card": .own,        "secret": .framed,        "session": .framed,        "sharmila.class": .framed,        "sharmila.client": .cream,        "sharmila.membership": .own,        "sharmila.studio": .ornamented,        "sharmila.trainer": .cream,        "song.amp": .own,        "song.cassette": .own,        "song.hifi": .own,        "song.party": .own,        "song.single": .own,        "song.tray": .own,        "song.turntable": .own,        "story.card": .own,        "subscription": .own,        "thread.slips": .own,        "todo.card": .own,        "track": .cream,        "transaction.cheque": .own,        "transaction.receipt": .own,        "unlock.card": .framed,        "video": .cream,    ]    /// The ground the face a kit names by `id` lies on, as its file declares    /// it (`static let ground`), or nil when this build has no face by that    /// id: whatever stands a card on a screen lays the ground behind it from    /// here, before the card is drawn.    public static func ground(_ id: String) -> FaceGround? {        grounds[id]    }    private static let grounds: [String: FaceGround] = [        "account.statement": .terrazzo,        "album.board": .bookcloth,        "album.carousel": .darkroomBench,        "album.sleeve": .tolex,        "album.tray": .tolex,        "artifact": .paper,        "artist.divider": .tolex,        "audio": .paper,        "birthday": .paper,        "book.hardback": .feltNavy,        "call.slip": .leatherDesk,        "character.card": .blank,        "cotton.today": .paper,        "cotton.tool": .paper,        "document": .paper,        "email": .paper,        "episode": .paper,        "episode.lobby": .velvet,        "event": .paper,        "event.rolodex": .kitchenTile,        "film.poster": .velvet,        "film.vhs": .claret,        "group": .paper,        "health.pedometer": .slate,        "health.stopwatch": .slate,        "health.tag": .slate,        "highlight.passage": .feltNavy,        "journal.diary": .bedsideTable,        "list.cassette": .tolex,        "machine": .paper,        "memory": .paper,        "mood": .paper,        "music.album": .paper,        "music.playlist": .paper,        "nancy.catering": .paper,        "nancy.chef": .paper,        "nancy.delivery": .paper,        "nancy.dish": .paper,        "nancy.place": .paper,        "nancy.plan": .paper,        "note.card": .blank,        "note.page": .feltOrange,        "page.clipping": .cobaltEnamel,        "passkey.card": .paper,        "person.file": .amethystDesk,        "person.passport": .amethystDesk,        "person.rolodex": .amethystDesk,        "person.telephone": .leatherDesk,        "photo.print": .darkroomBench,        "place.card": .blank,        "plain": .paper,        "plain.dish": .paper,        "podcast.radio": .formicaCounter,        "quota": .paper,        "scene.card": .blank,        "scene.chat": .blank,        "season.card": .velvet,        "secret": .paper,        "session": .paper,        "sharmila.class": .paper,        "sharmila.client": .paper,        "sharmila.membership": .paper,        "sharmila.studio": .paper,        "sharmila.trainer": .paper,        "song.amp": .tolex,        "song.cassette": .tolex,        "song.hifi": .tolex,        "song.party": .partyFloor,        "song.single": .tolex,        "song.tray": .tolex,        "song.turntable": .tolex,        "story.card": .blank,        "subscription": .paper,        "thread.slips": .pegboard,        "todo.card": .baizeTeal,        "track": .paper,        "transaction.cheque": .terrazzo,        "transaction.receipt": .terrazzo,        "unlock.card": .paper,        "video": .paper,    ]    /// The offered faces’ spoken titles, resolved from the kit; every face a    /// table offers has one (guard: `every_offered_face_has_a_title`), so a raw    /// face id is never said.    public static func title(_ id: String) -> String {        ShellLines.line("cards", ["faces", "titles", id.replacingOccurrences(of: ".", with: "_")].joined(separator: "."))    }    /// The face a kit names by `id`, or nil when this build has none by that id.    @MainActor public static func face(_ id: String) -> Face? {        byID[id]    }    @MainActor private static let byID = Dictionary(uniqueKeysWithValues: all.map { ($0.id, $0) })}