Skip to content

KcdMp.env.mock

Whether the page runs outside the game.

true when the page is opened in a plain browser - while it is being written, or in a test - and not in a player’s game. Every call then answers on the spot with a plain reply and KcdMp.mock drives the page’s handlers.

KcdMp.env.mock

boolean

if (KcdMp.env.mock) {
KcdMp.mock.emit("shop.items", { items: [{ id: "bread", price: 4 }] }); // stand in for the game mode
}

KcdMp.mock · the The page group of the index