Viv JavaScript Runtime - v0.10.2
    Preparing search index...

    Interface ItemView

    A read-only entity view for an item in a simulated storyworld.

    For details on semantics and constraints, see EntityView, which this interface extends.

    interface ItemView {
        entityType: Item;
        id: string;
        inscriptions: string[];
        location: string;
        [key: string]: ExpressionValue;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: ExpressionValue

      Additional properties whose structure depends entirely on the host application, with the caveat that the Viv runtime expects a plain object all the way down. As such, the values embedded here should not include types like functions or members of custom classes, but rather exclusively the types defined in the ExpressionValue union.

    Index

    Properties

    entityType: Item

    Discriminator specifying the item entity type.

    id: string

    A unique identifier for the entity.

    inscriptions: string[]

    Array containing entity IDs for all the actions about which this item inscribes knowledge.

    Should a character inspect the item, via Viv code using the 'inspect' operator, they will thereby learn about all the actions contained in this array. The inscriptions for an item grows via inscription events, which occur via Viv code using the 'inscribe' operator.

    location: string

    The entity ID for the current location of the item.

    Viv assumes that each item is in a discrete location at any given point, and that the location is itself an entity for which a LocationView may be requested.