screeps-api
    Preparing search index...

    Interface UserCodeEvent

    WebSocket event for code changes.

    When subscribed, the server sends an event with the full updated code base every time the code is changed.

    interface UserCodeEvent {
        data: UserCodeEventData;
        id?: string;
        path: "code";
        type: "user";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    The event payload. Extensions of this interface should specify a more precise type.

    id?: string

    ID of the entity the event is reporting on. Undefined when type is server.

    Examples:

    • User ID for user events
    • Room name (shard0/W0N0, W0N0, etc) for room events
    path: "code"

    When non-empty, indicates that the event concerns a property or aspect of type.

    Examples:

    • /resources for user-type events indicates an update to resource counts
    type: "user"