Skip to content

KcdMp.mock.use

Fires the surface-use handlers as if the player had pressed the use key on the surface.

Runs the handlers registered with KcdMp.onSurfaceUse, as the game does when the player uses a surface page’s prompt - a way to try a surface page’s use in a browser. It works for a frame’s page too, where nothing else would call them.

KcdMp.mock.use()

nothing

KcdMp.onSurfaceUse(() => console.log("used"));
if (KcdMp.env.mock) {
KcdMp.mock.use();
}

KcdMp.onSurfaceUse · the Mock mode group of the index