Remove unused launch-from-recipe dialog path (Refs #91)
CI / checks (push) Successful in 4m36s
CI / checks (push) Successful in 4m36s
This commit is contained in:
@@ -13,12 +13,10 @@
|
||||
|
||||
let {
|
||||
open = $bindable(false),
|
||||
sourceDeploymentId = '',
|
||||
initialGame = 't5',
|
||||
initialMapSlug = ''
|
||||
}: {
|
||||
open?: boolean;
|
||||
sourceDeploymentId?: string;
|
||||
initialGame?: ZombieGame;
|
||||
initialMapSlug?: string;
|
||||
} = $props();
|
||||
@@ -144,26 +142,6 @@
|
||||
const body = await response.json();
|
||||
if (current !== visit) return;
|
||||
catalogs = { t5: body.t5Zombie, t6: body.t6Zombie };
|
||||
if (sourceDeploymentId) {
|
||||
const sourceResponse = await fetch(
|
||||
`/api/provisioning/${encodeURIComponent(sourceDeploymentId)}`,
|
||||
{ signal }
|
||||
);
|
||||
const source = await sourceResponse.json();
|
||||
if (current !== visit) return;
|
||||
if (
|
||||
!sourceResponse.ok ||
|
||||
!source.recipe ||
|
||||
!['t5', 't6'].includes(source.recipe.game) ||
|
||||
!catalogs[source.recipe.game as ZombieGame].some(
|
||||
(map) => map.slug === source.recipe.mapSlug
|
||||
)
|
||||
) {
|
||||
throw new Error('The original launch map is unavailable.');
|
||||
}
|
||||
game = source.recipe.game;
|
||||
mapSlug = source.recipe.mapSlug;
|
||||
}
|
||||
if (!catalogs[game].some((map) => map.slug === mapSlug))
|
||||
mapSlug = catalogs[game][0]?.slug ?? '';
|
||||
loaded = true;
|
||||
|
||||
Reference in New Issue
Block a user