28 lines
670 B
TypeScript
28 lines
670 B
TypeScript
// `map.view` payloads. Coordinates are map fields; continents are 100 × 100 (K55 holds 500|500).
|
||
|
||
export interface MapVillage {
|
||
id: number
|
||
x: number
|
||
y: number
|
||
name: string
|
||
points: number
|
||
continent: string
|
||
/** null for barbarian villages. */
|
||
player: { id: number; name: string } | null
|
||
own: boolean
|
||
}
|
||
|
||
/** `map.view {world_id, x?, y?, w, h}`: the w × h window around center, kept inside the map. */
|
||
export interface MapView {
|
||
world_id: number
|
||
/** The map is size × size fields. */
|
||
size: number
|
||
center: { x: number; y: number }
|
||
/** Top-left field of the window. */
|
||
x: number
|
||
y: number
|
||
w: number
|
||
h: number
|
||
villages: MapVillage[]
|
||
}
|