UNPKG

gbx

Version:

a slim, fast and easy to set up Gamebox (GBX) parser written in TypeScript

362 lines (361 loc) 9.52 kB
import GameVersion from '../Utilities/GameVersion'; import CGameCtnBlock from './CGameCtnBlock'; import CGameCtnChallengeParameters from './CGameCtnChallengeParameters'; import CGameCtnCollectorList from './CGameCtnCollectorList'; /** * A map. * @chunk 0x03043000 */ export default class CGameCtnChallenge extends GameVersion { authorExtraInfo?: string; authorLogin?: string; authorNickname?: string; authorScore?: number; authorTime?: number; authorVersion?: number; authorZone?: string; blocks?: CGameCtnBlock[]; blockStock?: CGameCtnCollectorList; bronzeTime?: number; buildVersion?: string; challengeParameters?: CGameCtnChallengeParameters; checkpoints?: Int3[]; comments?: string; cost?: number; crc32?: number; createdWithSimpleEditor?: boolean; customMusicPackDesc?: string; dayDuration?: number; dayTime?: number; decoBaseHeightOffset?: number; decoration?: IMeta; dynamicDaylight?: boolean; editorMode?: EditorMode; goldTime?: number; hasCustomCamThumbnail?: boolean; hashedPassword?: number[]; headerVersion?: number; isLapRace?: boolean; isMultilap?: boolean; lightmapCacheUid?: number; lightmapVersion?: number; mapCoordOrigin?: Vector2 | number[]; mapCoordTarget?: Vector2 | number[]; mapInfo?: IMeta; mapKind?: MapKind; mapName?: string; mapStyle?: string; mapType?: string; modPackDesc?: string; nbCheckpoints?: number; nbLaps?: number; needUnlock?: boolean; objectiveTextAuthor?: string; objectiveTextBronze?: string; objectiveTextGold?: string; objectiveTextSilver?: string; offzones?: { 1: Int3; 2: Int3; }[]; offzoneTriggerSize?: number[]; packMask?: number; password?: string; playerModel?: IMeta; playMode?: PlayMode; silverTime?: number; size?: Int3; thumbnailData?: number[]; thumbnailFarClipPlane?: number; thumbnailFov?: number; thumbnailNearClipPlane?: number; thumbnailPitchYawRoll?: Vector3; thumbnailPosition?: Vector3; thumbnailSize?: number; titleId?: string; worldDistortion?: Vector3; xml?: string; /** * (Header) Map information * @games All games */ protected 0x03043002: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Header) Common map information * @games All games */ protected 0x03043003: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Header) Header version * @games TMSX and above */ protected 0x03043004: ({ r }: Chunk) => void; /** * (Header) XML data * @games TMSX and above */ protected 0x03043005: ({ r }: Chunk) => void; /** * (Header) Thumnbnail and comments * @games TMU and above */ protected 0x03043007: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Header) Author information * @games MP3 and above */ protected 0x03043008: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Vehicle model * @games All games */ protected 0x0304300d: ({ r }: Chunk) => void; /** * Block data * @games TM1.0 only */ protected 0x0304300f: ({ r }: Chunk) => void; /** * Puzzle block inventory, challenge parameters and map kind * @games All games */ protected 0x03043011: ({ r }: Chunk) => void; /** * Legacy block data * @games Unknown */ protected 0x03043013: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Legacy password * @games TMSX, TMNESWC, TMU */ protected 0x03043014: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) * @games TMSX, TMNESWC */ protected 0x03043016: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Checkpoints * @games TMSX, TMNESWC, TMU, TMF */ protected 0x03043017: ({ r }: Chunk) => void; /** * (Skippable) Lap information * @games TMSX and above */ protected 0x03043018: ({ r }: Chunk) => void; /** * (Skippable) Mod information * @games TMSX and above */ protected 0x03043019: ({ r }: Chunk) => void; /** * @games Unknown */ protected 0x0304301a: ({ r }: Chunk, f: ChunkFunctions) => void; /** * OldIgs * @games Unknown */ protected 0x0304301b: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Play mode * @games TMSX, TMNESWC, TMU, TMF */ protected 0x0304301c: ({ r }: Chunk) => void; /** * @games Unknown */ protected 0x0304301d: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Block data * @games TMSX and above */ protected 0x0304301f: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Deprecated MediaTracker data * @games Unknown */ protected 0x03043020: ({ r, fullChunkId }: Chunk) => void; /** * Legacy MediaTracker data * @games TMSX, TMNESWC, TMU, TMF */ protected 0x03043021: ({ r, fullChunkId }: Chunk) => void; /** * @games TMSX and above */ protected 0x03043022: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Legacy map origin/target * @games Unknown */ protected 0x03043023: ({ r }: Chunk) => void; /** * Custom music * @games TMSX and above */ protected 0x03043024: ({ r }: Chunk) => void; /** * Map origin/target * @games TMSX and above */ protected 0x03043025: ({ r }: Chunk) => void; /** * Clip global * @games TMNESWC and above */ protected 0x03043026: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Old realtime thumbnail * @games Unknown */ protected 0x03043027: ({ r }: Chunk, f: ChunkFunctions) => void; /** * Old realtime thumbnail and comments * @games TMU and above */ protected 0x03043028: (chunk: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Password * @games TMF and above */ protected 0x03043029: ({ r }: Chunk) => void; /** * Simple editor * @games TMF and above */ protected 0x0304302a: ({ r }: Chunk) => void; /** * (Skippable) Realtime thumbnail and comments * @games TMF and above */ protected 0x0304302d: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) * @games MP3 and above */ protected 0x03043034: ({ r }: Chunk) => void; /** * (Skippable) Realtime thumbnail and comments * @games MP3 and above */ protected 0x03043036: (chunk: Chunk, f: ChunkFunctions) => void; /** * (Skippable) CarMarksBuffer * @games MP3 and above */ /** * (Skippable/Encapsulated) Items * @games MP3 and above */ protected 0x03043040: ({ r, length }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Author information * @games MP3 and above */ protected 0x03043042: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Genealogies * @games MP3 and above */ /** * (Skippable) Metadata * @games MP3 and above */ /** * (Skippable) * @games MP3, TMT */ protected 0x03043047: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Baked blocks * @games MP3 and above */ /** * MediaTracker data * @games MP3 and above */ protected 0x03043049: ({ r, fullChunkId }: Chunk) => void; /** * (Skippable) Objectives * @games MP3 and above */ protected 0x0304304b: ({ r }: Chunk) => void; /** * (Skippable) Offzones * @games MP3 and above */ protected 0x03043050: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Title information * @games MP3 and above */ protected 0x03043051: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Decoration height * @games MP3 and above */ protected 0x03043052: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Bot paths * @games MP3 and above */ /** * (Skippable) Embedded objects * @games MP3 and above */ /** * (Skippable) Light settings * @games MP4 and above */ protected 0x03043056: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) SubMapsInfos * @games MP4 only */ protected 0x03043058: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) World distortion * @games MP4 and above */ protected 0x03043059: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) * @games TM2020 only */ protected 0x0304305a: ({ r }: Chunk, f: ChunkFunctions) => void; /** * (Skippable) Lightmaps * @games TM2020 only */ /** * (Skippable) Free blocks * @games TM2020 only */ /** * (Skippable) MapElemColor */ /** * (Skippable) AnimPhaseOffset * @games TM2020 only */ /** * (Skippable) Foreground pack desc * @games TM2020 only */ /** * (Skippable) MapElemLmQuality * @games TM2020 only */ /** * (Skippable) Macroblock instances * @games TM2020 only */ /** * (Skippable) Light settings (2) * @games TM2020 only */ protected 0x0304306b: ({ r }: Chunk, f: ChunkFunctions) => void; }