UNPKG

@bscotch/yy

Version:

Stringify, parse, read, and write GameMaker yy and yyp files.

43 lines 1.07 kB
import { z } from 'zod'; import { nameField, unstable } from './utility.js'; export const yyParentSchema = z .object({ name: z.string().describe("Folder's 'name' field"), path: z.string().describe("Folder's 'folderPath' field"), }) .default({ name: 'NEW', path: 'folders/NEW.yy' }); export const configValuesSchema = z .record(z.string(), z.record(z.string(), z.string())) .optional(); export const yyBaseSchema = unstable({ [nameField]: z.string().optional(), ConfigValues: configValuesSchema, name: z.string(), resourceType: z.string(), tags: z.array(z.string()).optional(), /** * Parent folder */ parent: yyParentSchema, resourceVersion: z.string().default('1.0'), }); export const yyResourceTypes = [ 'animcurves', 'extensions', 'fonts', 'notes', 'objects', 'particles', 'paths', 'rooms', 'roomui', 'extensions', 'scripts', 'sequences', 'shaders', 'sounds', 'sprites', 'tilesets', 'timelines', ]; //# sourceMappingURL=YyBase.js.map