screeps-api
    Preparing search index...

    Interface RoomEvent

    WebSocket event for room objects and other room state updates.

    When subscribed, the server will send one event per subscribed room per tick with updated RoomEventData.

    Raw sample events:
    ["room:shardSeason/E15N8",{"objects":{"6a1c36afd05a7c237d18c9ae":{"reservation":{"endTime":231807}},"6a1c36afd05a7c237d18c9af":{"energy":2240,"invaderHarvested":38070},"6a1c36afd05a7c237d18c9b0":{"energy":2656,"invaderHarvested":37854},"6a2906a5a367ccd541edc2be":{"store":{"energy":560}},"6a29075abc245f3e92ad02d9":{"store":{"energy":405}},"6a2940bf8e693b5fca2fac27":{"x":28,"y":42},"6a2941332784cf33c0d3f004":{"x":31,"y":44}},"gameTime":231346,"info":{"mode":"world"},"visual":""}]
    interface RoomEvent {
        data: RoomEventData;
        id: string;
        path: string;
        type: "room";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

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

    id: string

    The name of the shard or the name of the room.

    On official servers, this is set to the shard name. On unofficial servers, this is set to the room name.

    path: string

    The name of the room or an empty string

    On official servers, this is set to the room name. On unofficial servers, this is an empty string.

    type: "room"