Object damage calculator · Search params & storage
0 modules · 0 exports · 0 repositories · 5 e2e tests · 1 route
The state Object damage calculator keeps in the URL and in the browser's storage. Every param has a default and never fails to decode, see Search params, and each definition should have an assertRoundTrips test. The definitions of the whole app are listed in the reference.
Search params
URL calculatorSearchParams
app/features/object-damage-calculator/calculator-search-params.ts:35
| Param | Value | Default | Loader | Description |
|---|---|---|---|---|
weapon | custom SearchParams.nullableCodec(anyWeapon) | null | false | |
category | v.nullable( v.picklist([ ...weaponCategories.map((category) => category.name), "SUBS", "SPECIALS", ]), ) | null | false | Same as |
ap | v.pipe( v.number(), v.integer(), v.check((value) => possibleApValues().includes(value)), ) | 0 | false | |
dmg | v.nullable(v.picklist(DAMAGE_TYPE)) | null | false | |
multi | v.boolean() | true | false |
Used in calculator-hooks.tscalculator-urls.tsobject-damage-calculator.tsx