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:
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;
|
||||
}
|
||||
Reference in new issue
Block a user