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.
Syntax
Section titled “Syntax”KcdMp.env.mockboolean
Example
Section titled “Example”if (KcdMp.env.mock) { KcdMp.mock.emit("shop.items", { items: [{ id: "bread", price: 4 }] }); // stand in for the game mode}See also
Section titled “See also”KcdMp.mock · the The page group of the index
