Implement vehicle research and purchases

Recompute unlocked ranks, prerequisites, and unit states before serving
profiles. Add research target selection, research conversion, vehicle
and slot purchases, and the price table. Support editing convertible RP
and restrict hidden vehicle visibility to eligible entries.

The client still displays zero purchase prices pending price table
integration.
This commit is contained in:
N0VAN0M4LY committed 2026-11-24 21:04:19 +08:00
1 parent 8b31277c58
commit 7a08fff85e
37 files changed
+1336 -75

No files matched your search

@@ -0,0 +1,12 @@
/** Typed reads of a char request's BLK parameters; a missing or differently typed parameter reads as undefined. */
import { findParam, type BlkBlock } from '@wto/blk';
export function stringParam(payload: BlkBlock, name: string): string | undefined {
const value = findParam(payload, name)?.value;
return value?.type === 'string' ? value.value : undefined;
}
export function intParam(payload: BlkBlock, name: string): number | undefined {
const value = findParam(payload, name)?.value;
return value?.type === 'int' ? value.value : undefined;
}