Skip to content

Reference

tilttek/session-prep

Every public type of the package, with its role. The types marked internal may change in any version.

Preparations

TypeRole
SessionPreparerThe service: create, change, link, mark the facts, ready, close, reopen, carry over, delete and read.
PreparationThe preparation of one session: its title, its session, its parts and its status.
PreparationStatusDraft, ready or closed.
PartAn element of a preparation, found by its key.
SceneA scene that might happen, the characters and places it features, and its status.
SceneStatusPlanned, played or skipped.
SecretSomething the players may learn, its clues, and whether it is revealed.
ClueOne way to come upon a secret, and whether it was found.
NonPlayerCharacterA character the game master plays, and their entry elsewhere.
PlaceA place the characters may go, and its entry elsewhere.
NoteA free note of the game master.
ChecklistItemA step of the preparation, required or not, and whether it is checked.
ChecklistTemplateThe steps given to a preparation as its checklist; standard() is a general one.
PreparationQueryWhich preparations to read: of a campaign, of a game master, for a session, in a status.

Ports and stores

TypeRole
Contract\PreparationStoreKeeps the preparations at a version, deletes them and reads them by query.
Contract\PreparationObserverTold of the events of a preparation.
Store\InMemoryPreparationStoreThe preparations in memory, for tests.

Events

TypeRole
Event\PreparationEventEvery event: the preparation.
Event\PreparationCreatedA preparation was created.
Event\PreparationChangedIts parts were changed.
Event\SessionLinkedIt was linked to a session, or to none.
Event\SceneMarkedA scene was played, skipped, or planned again.
Event\SecretMarkedA secret was revealed, or hidden again.
Event\ClueMarkedA clue was found, or not.
Event\ItemMarkedAn item of the checklist was checked, or not.
Event\PreparationReadyIt is ready for the table.
Event\PreparationReopenedIt is a draft again.
Event\PreparationClosedIt was closed.
Event\PreparationCarriedOverWhat another one left over was carried into it.
Event\PreparationDeletedIt was deleted.

Exceptions

TypeRole
Exception\SessionPrepExceptionEvery exception of the library.
Exception\InvalidPreparationA value out of its shape or its bounds, or a part no preparation has.
Exception\PreparationRefusedA change the service does not allow.
Exception\PreparationNotFoundNo preparation has the identifier.
Exception\PreparationConflictThe preparation changed since it was read.

Internal

TypeRole
Internal\IdentifierThe shape of an identifier and of a key, and lists of distinct keys.
Internal\TextOne line or lines of text, checked and bounded.
Internal\PartsLists of parts by key: distinct, found, put, removed and moved.