Skip to content

Commit

Permalink
/a.,smndfibuagy9sdof
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 committed Aug 31, 2024
1 parent da77481 commit 5e42182
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions apps/backend/src/app/dto/map/map-zones.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.' +
Expand Down
6 changes: 3 additions & 3 deletions libs/formats/zone/src/suggestions-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
])
Expand All @@ -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`
);
Expand Down

0 comments on commit 5e42182

Please sign in to comment.