diff --git a/apps/backend/src/app/dto/map/map-zones.dto.ts b/apps/backend/src/app/dto/map/map-zones.dto.ts index 63caae4f4..c12c05ee0 100644 --- a/apps/backend/src/app/dto/map/map-zones.dto.ts +++ b/apps/backend/src/app/dto/map/map-zones.dto.ts @@ -80,6 +80,10 @@ export class RegionDto /* extends JsonifiableDto */ implements Region { @IsOptional() readonly teleDestYaw?: number; + // TODO: DO poperpyl + @IsOptional() + readonly teleDestTargetname?: string; + @ApiProperty({ description: 'The "safe height" is the greatest height from the base of the region that the player is allowed to enter "primed" state from - see the docs for a detailed explanation.' + diff --git a/libs/formats/zone/src/suggestions-validator.ts b/libs/formats/zone/src/suggestions-validator.ts index 67fdcdc3c..69e41ee33 100644 --- a/libs/formats/zone/src/suggestions-validator.ts +++ b/libs/formats/zone/src/suggestions-validator.ts @@ -172,7 +172,7 @@ export function validateSuggestions( // Zone and suggestions must have main tracks per their respective validators, // and we don't do suggestions for stages, so all that's left is to check that // all bonus tracks have suggestions: - for (let i = 1; i < zoneData.tracks.bonuses.length + 1; i++) { + for (let i = 1; i < (zoneData.tracks.bonuses ?? []).length + 1; i++) { if ( !suggestions.some( ({ trackType, trackNum }) => trackType === TT.BONUS && trackNum === i @@ -188,7 +188,7 @@ export function validateSuggestions( if (type === SuggestionType.APPROVAL) { [ [TrackType.MAIN, 1], - ...arrayFrom(zoneData.tracks.bonuses.length, (i) => [ + ...arrayFrom((zoneData.tracks.bonuses ?? []).length, (i) => [ TrackType.BONUS, i + 1 ]) @@ -214,7 +214,7 @@ export function validateSuggestions( suggestions .filter(({ trackType }) => trackType === TrackType.BONUS) .forEach(({ trackNum }) => { - if (!zoneData.tracks.bonuses[trackNum - 1]) { + if (!(zoneData.tracks.bonuses ?? [])[trackNum - 1]) { throw new SuggestionValidationError( `Suggestion refers to bonus track (${trackNum}) that does not exist` );