screeps-api
    Preparing search index...

    Interface RoomEventData

    Payload of a RoomEvent

    // Initial event:
    {
    objects: {
    '58dbc28b8283ff5308a3c0ba': {
    _id: '58dbc28b8283ff5308a3c0ba',
    room: 'W97S73',
    type: 'source',
    x: 12, y: 14,
    energy: 1908,
    energyCapacity: 3000,
    ticksToRegeneration: 300,
    nextRegenerationTime: 20308471,
    invaderHarvested: 45324
    },
    '59663a8e82b5ab1b911ca1a9': {
    _id: '59663a8e82b5ab1b911ca1a9',
    type: 'road',
    x: 17,
    y: 42,
    room: 'W97S73',
    notifyWhenAttacked: true,
    hits: 22080,
    hitsMax: 25000,
    nextDecayTime: 20308833
    },
    },
    gameTime: 20307112,
    info: {
    mode: 'world'
    },
    visual: ''
    }
    // Results for subsequent events:
    {
    objects: {
    '58dbc28b8283ff5308a3c0ba': {
    energy: 948,
    invaderHarvested: 34284
    },
    '5967d460eebe3d6404c26852': { nextDecayTime: 20307861 },
    },
    gameTime: 20307112,
    info: {
    mode: 'world'
    },
    visual: ''
    }
    interface RoomEventData {
        gameTime: number;
        info: { mode: "world" | "arena" };
        objects: { [_id: string]: RoomObject | null };
        visual: string;
    }
    Index

    Properties

    gameTime: number

    The current game time (in ticks)

    info: { mode: "world" | "arena" }

    The current game mode (usually 'world')

    objects: { [_id: string]: RoomObject | null }

    Room objects indexed by ID.

    Warning: only the first event returns full room object properties. Subsequent events only return the modified properties.

    When an object ID maps to null, this indicates that the object with that ID has disappeared from the room (i.e. it died, got destroyed, expired, moved to another room, etc).

    visual: string