@bscotch/yy
Version:
Stringify, parse, read, and write GameMaker yy and yyp files.
179 lines • 8.26 kB
TypeScript
import { z } from 'zod';
/**
* @file Typings for components of a freshly-parsed YYP file,
* when it is stored as a collection of plain objects.
* See {@link ./Gms2ProjectComponents.ts} for typings related
* to when the vanilla content has been replaced with class
* instances.
*/
export type YypResourceId = z.infer<typeof yypResourceIdSchema>;
export declare const yypResourceIdSchema: z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>;
/** A 'Resource' is a an asset like a sprite, object, script, and so on. */
export type YypResource = z.infer<typeof yypResourceSchema>;
declare const yypResourceSchema: z.ZodObject<{
id: z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>;
order: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export type YypOption = z.infer<typeof yypOptionSchema>;
declare const yypOptionSchema: z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>;
export interface YypConfig {
name: string;
children: YypConfig[];
}
export type YypRoomOrderNode = z.infer<typeof yypRoomOrderNodeSchema>;
declare const yypRoomOrderNodeSchema: z.ZodObject<{
roomId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>;
export type YypFolder = z.infer<typeof yypFolderSchema>;
export declare const yypFolderSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
name: z.ZodString;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
folderPath: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMFolder">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>>;
export type YypAudioGroup = z.infer<typeof yypAudioGroupSchema>;
export type YypAudioGroupLoose = z.input<typeof yypAudioGroupSchema>;
export declare const yypAudioGroupSchema: z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
targets: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMAudioGroup">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
export type YypTextureGroup = z.infer<typeof yypTextureGroupSchema>;
export declare const yypTextureGroupSchema: z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
groupParent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>>>;
isScaled: z.ZodDefault<z.ZodBoolean>;
customOptions: z.ZodDefault<z.ZodString>;
compressFormat: z.ZodDefault<z.ZodString>;
autocrop: z.ZodDefault<z.ZodBoolean>;
border: z.ZodDefault<z.ZodNumber>;
mipsToGenerate: z.ZodDefault<z.ZodNumber>;
targets: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
loadType: z.ZodDefault<z.ZodEnum<{
default: "default";
dynamicpages: "dynamicpages";
}>>;
directory: z.ZodDefault<z.ZodString>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMTextureGroup">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$loose>;
export type YypIncludedFile = z.infer<typeof yypIncludedFileSchema>;
declare const yypIncludedFileSchema: z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
CopyToMask: z.ZodString;
}, z.core.$strip>>>;
name: z.ZodString;
CopyToMask: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
filePath: z.ZodString;
resourceType: z.ZodDefault<z.ZodLiteral<"GMIncludedFile">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>;
/** The YYP content that has not changed across GMS2.3 subversions */
export type Yyp = z.infer<typeof yypSchema>;
export declare const yypSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
"%Name": z.ZodOptional<z.ZodString>;
name: z.ZodString;
resourceType: z.ZodDefault<z.ZodLiteral<"GMProject">>;
resources: z.ZodDefault<z.ZodArray<z.ZodObject<{
id: z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>;
order: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>>;
RoomOrderNodes: z.ZodDefault<z.ZodArray<z.ZodObject<{
roomId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>>>;
Options: z.ZodOptional<z.ZodArray<z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>>>;
isDnDProject: z.ZodOptional<z.ZodBoolean>;
defaultScriptType: z.ZodDefault<z.ZodNumber>;
isEcma: z.ZodDefault<z.ZodBoolean>;
tutorialPath: z.ZodOptional<z.ZodString>;
configs: z.ZodObject<{
name: z.ZodDefault<z.ZodLiteral<"Default">>;
children: z.ZodDefault<z.ZodArray<z.ZodType<YypConfig, unknown, z.core.$ZodTypeInternals<YypConfig, unknown>>>>;
}, z.core.$strip>;
Folders: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
name: z.ZodString;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
folderPath: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMFolder">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>>>>;
AudioGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
targets: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMAudioGroup">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>>>;
TextureGroups: z.ZodDefault<z.ZodArray<z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
name: z.ZodString;
groupParent: z.ZodDefault<z.ZodNullable<z.ZodObject<{
name: z.ZodString;
path: z.ZodString;
}, z.core.$strip>>>;
isScaled: z.ZodDefault<z.ZodBoolean>;
customOptions: z.ZodDefault<z.ZodString>;
compressFormat: z.ZodDefault<z.ZodString>;
autocrop: z.ZodDefault<z.ZodBoolean>;
border: z.ZodDefault<z.ZodNumber>;
mipsToGenerate: z.ZodDefault<z.ZodNumber>;
targets: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
loadType: z.ZodDefault<z.ZodEnum<{
default: "default";
dynamicpages: "dynamicpages";
}>>;
directory: z.ZodDefault<z.ZodString>;
resourceType: z.ZodDefault<z.ZodLiteral<"GMTextureGroup">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$loose>>>;
IncludedFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
CopyToMask: z.ZodString;
}, z.core.$strip>>>;
name: z.ZodString;
CopyToMask: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, number | bigint>>>;
filePath: z.ZodString;
resourceType: z.ZodDefault<z.ZodLiteral<"GMIncludedFile">>;
resourceVersion: z.ZodDefault<z.ZodString>;
}, z.core.$strip>>>;
MetaData: z.ZodObject<{
IDEVersion: z.ZodString;
}, z.core.$strip>;
LibraryEmitters: z.ZodOptional<z.ZodArray<z.ZodAny>>;
resourceVersion: z.ZodString;
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$loose>>;
export {};
//# sourceMappingURL=Yyp.d.ts.map