Add per-condition encounter rates to seed data (#26)
All checks were successful
CI / backend-lint (push) Successful in 9s
CI / actions-lint (push) Successful in 15s
CI / frontend-lint (push) Successful in 20s

Co-authored-by: Julian Tabel <juliantabel.jt@gmail.com>
Co-committed-by: Julian Tabel <juliantabel.jt@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
2026-02-17 19:38:29 +01:00
committed by TheFurya
parent d0fff248fe
commit 7df56325a8
38 changed files with 36723 additions and 11591 deletions

View File

@@ -63,6 +63,8 @@ export function AdminRouteDetail() {
? Math.max(...childRoutes.map((r) => r.order)) + 1
: (route?.order ?? 0) * 10 + 1
const hasConditions = encounters.some((e) => e.condition !== '')
const columns: Column<RouteEncounterDetail>[] = [
{
header: 'Pokemon',
@@ -79,6 +81,14 @@ export function AdminRouteDetail() {
},
{ header: 'Method', accessor: (e) => e.encounterMethod },
{ header: 'Rate', accessor: (e) => `${e.encounterRate}%` },
...(hasConditions
? [
{
header: 'Condition',
accessor: (e: RouteEncounterDetail) => e.condition || '\u2014',
} as Column<RouteEncounterDetail>,
]
: []),
{
header: 'Levels',
accessor: (e) =>