@lands.io/mod-sdk / ModButtonContext
Interface: ModButtonContext¶
Context provided to mod action buttons for determining visibility and behavior.
Table of contents¶
Properties¶
Properties¶
clickedCell¶
• clickedCell: null | { x: number ; y: number }
The clicked cell coordinates, or null if no cell clicked
game¶
• game: Game
The current game instance
myPlayer¶
• myPlayer: null | Player
The local player, or null if spectating
playerActions¶
• Optional playerActions: unknown
Player actions state
tile¶
• tile: number
The tile that was clicked
uiState¶
• Optional uiState: unknown
UI state information
Source Code¶
View full implementation
/**
* Context provided to mod action buttons for determining visibility and behavior.
*/
export interface ModButtonContext {
/** The current game instance */
game: Game;
/** The clicked cell coordinates, or null if no cell clicked */
clickedCell: { x: number; y: number } | null;
/** The local player, or null if spectating */
myPlayer: Player | null;
/** The tile that was clicked */
tile: TileRef;
/** Player actions state */
playerActions?: unknown;
/** UI state information */
uiState?: unknown;
}