five-on-it / packages/world/src/schema / LevelDataSchema
Variable: LevelDataSchema
constLevelDataSchema:ZodObject<{cameras:ZodOptional<ZodArray<ZodObject<{name:ZodString;period:ZodNumber;range:ZodNumber;sweep:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;containers:ZodOptional<ZodArray<ZodObject<{items:ZodArray<ZodObject<{count:ZodNumber;item:ZodString; },$strip>>;kind:ZodEnum<{crate:"crate";locker:"locker";pickup:"pickup"; }>;lock:ZodOptional<ZodString>;name:ZodString;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;districts:ZodOptional<ZodArray<ZodObject<{areas:ZodArray<ZodObject<{depth:ZodNumber;width:ZodNumber;x:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>;name:ZodString;pedestrians:ZodOptional<ZodRecord<ZodString,ZodNumber>>;theme:ZodOptional<ZodString>;title:ZodString; },$strip>>>;doors:ZodOptional<ZodArray<ZodObject<{depth:ZodNumber;height:ZodNumber;kind:ZodOptional<ZodEnum<{barrier:"barrier";door:"door";gate:"gate"; }>>;lock:ZodOptional<ZodString>;name:ZodString;width:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;dummies:ZodArray<ZodObject<{x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>;escalators:ZodOptional<ZodArray<ZodObject<{height:ZodNumber;length:ZodNumber;name:ZodString;up:ZodBoolean;width:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;garages:ZodOptional<ZodArray<ZodObject<{depth:ZodNumber;height:ZodNumber;name:ZodString;respray:ZodOptional<ZodNumber>;store:ZodOptional<ZodNumber>;width:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;groundHalfSize:ZodNumber;ladders:ZodOptional<ZodArray<ZodObject<{height:ZodNumber;name:ZodString;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;lifts:ZodOptional<ZodArray<ZodObject<{depth:ZodNumber;name:ZodString;stops:ZodArray<ZodNumber>;width:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;meshes:ZodRecord<ZodString,ZodObject<{groups:ZodArray<ZodObject<{color:ZodTuple<[ZodNumber,ZodNumber,ZodNumber],null>;count:ZodNumber;start:ZodNumber; },$strip>>;indices:ZodArray<ZodNumber>;vertices:ZodArray<ZodNumber>; },$strip>>;nailStrips:ZodArray<ZodObject<{length:ZodNumber;x:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>;npcs:ZodOptional<ZodArray<ZodObject<{items:ZodArray<ZodObject<{count:ZodNumber;item:ZodString; },$strip>>;loop:ZodOptional<ZodBoolean>;name:ZodString;patrol:ZodOptional<ZodArray<ZodTuple<[ZodNumber,ZodNumber],null>>>;refuge:ZodOptional<ZodTuple<[ZodNumber,ZodNumber],null>>;role:ZodEnum<{civilian:"civilian";driver:"driver";guard:"guard";target:"target";vip:"vip"; }>;schedule:ZodOptional<ZodArray<ZodObject<{at:ZodNumber;do:ZodEnum<...>;every:ZodOptional<...>;for:ZodOptional<...>;points:ZodArray<...>; },$strip>>>;turn:ZodOptional<ZodNumber>;vehicle:ZodOptional<ZodString>;weapon:ZodString;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;placements:ZodArray<ZodObject<{breakable:ZodOptional<ZodNumber>;kind:ZodEnum<{building:"building";prop:"prop";structure:"structure";terrain:"terrain"; }>;mesh:ZodString;name:ZodString;pitch:ZodNumber;scale:ZodTuple<[ZodNumber,ZodNumber,ZodNumber],null>;shape:ZodEnum<{hull:"hull";none:"none";trimesh:"trimesh"; }>;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>;roads:ZodArray<ZodObject<{kind:ZodOptional<ZodEnum<{avenue:"avenue";country:"country";highway:"highway";lane:"lane";street:"street";track:"track"; }>>;lanes:ZodNumber;lanesBack:ZodNumber;name:ZodString;points:ZodArray<ZodTuple<[ZodNumber,ZodNumber,ZodNumber],null>>;speed:ZodNumber;surface:ZodOptional<ZodLiteral<"dirt">>;width:ZodNumber; },$strip>>;schemaVersion:ZodOptional<ZodNumber>;shops:ZodOptional<ZodArray<ZodObject<{items:ZodArray<ZodString>;name:ZodString;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;sky:ZodOptional<ZodObject<{climate:ZodString;clock:ZodOptional<ZodObject<{pace:ZodNumber;start:ZodString; },$strip>>; },$strip>>;spawners:ZodOptional<ZodArray<ZodObject<{classes:ZodArray<ZodString>;key:ZodString;locked:ZodBoolean;name:ZodString;owner:ZodEnum<{nobody:"nobody";npc:"npc"; }>;respawn:ZodNumber;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>>;spawns:ZodArray<ZodObject<{role:ZodOptional<ZodEnum<{guards:"guards";hospital:"hospital";players:"players";police:"police";traffic:"traffic"; }>>;x:ZodNumber;y:ZodNumber;yaw:ZodNumber;z:ZodNumber; },$strip>>;water:ZodOptional<ZodArray<ZodObject<{depth:ZodNumber;kind:ZodEnum<{lava:"lava";water:"water"; }>;name:ZodString;width:ZodNumber;x:ZodNumber;y:ZodNumber;z:ZodNumber; },$strip>>>; },$strip>
Defined in: packages/world/src/schema.ts:264
Validates a LevelData: every field present, every number finite, every size positive, every triangle within its mesh, every placement's mesh in the level, every door's and container's tag and item well formed (a door's kind known), every camera's sweep within a half turn, every NPC's role known (its schedule's hours and activities too), every spawner's classes and key, every garage's prices, every spawn point's role known, every shop selling something, every district's name, title and theme and its areas, every ladder's height, every lift's stops climbing.