UNPKG

@battle-racing/br-common-lib

Version:

Common library for all Battle Racing Repositorios

25 lines (23 loc) 711 B
import { z } from 'zod'; import { checkpointTypeSchema } from '../checkpoint'; import { flagStatusSchema, rgbStatusSchema, screenStatusSchema, speedStatusSchema } from '../hardware'; export const kartHardwareStateSchema = z.object({ speed: z .object({ status: speedStatusSchema, current: z.number(), configured: z.number(), }) .nullable(), rgb: rgbStatusSchema.nullable(), flag: z .object({ status: flagStatusSchema, checkpointType: checkpointTypeSchema.nullable(), checkpointAddress: z.number().nullable(), }) .nullable(), screen: screenStatusSchema.nullable(), isConnectedToServer: z.boolean(), isSteeringWheelPressed: z.boolean(), });