Skip to content

Commit 6f052bb

Browse files
fix: make /Planning return all entrances for location, not just unlocked
Fixes Berlin egg hunt starting in wrong location
1 parent d4bbed4 commit 6f052bb

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

components/menus/planning.ts

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
getSubLocationFromContract,
4141
mapObjectives,
4242
} from "../contracts/dataGen"
43-
import { getConfig } from "../configSwizzleManager"
43+
import { getConfig, getVersionedConfig } from "../configSwizzleManager"
4444
import { getUserData, writeUserData } from "../databaseHandler"
4545
import { getMaxProfileLevel, nilUuid, unlockOrderComparer } from "../utils"
4646

@@ -262,20 +262,11 @@ export async function getPlanningData(
262262
contractData.Metadata.LocationSuitOverride,
263263
)
264264

265-
const unlockedEntrances = typedInv
266-
.filter((item) => item.Unlockable.Type === "access")
267-
.map((i) => i.Unlockable)
268-
.filter((unlockable) => unlockable.Properties.RepositoryId)
269-
270-
if (!unlockedEntrances) {
271-
log(
272-
LogLevel.ERROR,
273-
"No matching entrance data found in planning, this is a bug!",
274-
)
275-
return {
276-
error: true,
277-
}
278-
}
265+
const allEntrances = getVersionedConfig<Unlockable[]>(
266+
"allunlockables",
267+
gameVersion,
268+
false,
269+
).filter((u) => u.Subtype === "startinglocation")
279270

280271
sublocation.DisplayNameLocKey = `UI_${sublocation.Id}_NAME`
281272

@@ -492,7 +483,7 @@ export async function getPlanningData(
492483
Entrances:
493484
contractData.Metadata.Type === "sniper"
494485
? null
495-
: unlockedEntrances
486+
: allEntrances
496487
.filter((unlockable) =>
497488
entrancesInScene.includes(
498489
unlockable.Properties.RepositoryId || "",

0 commit comments

Comments
 (0)