Skip to content

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

ParamValueDefaultLoaderDescription
weaponcustom SearchParams.nullableCodec(anyWeapon)nullfalse
category
v.nullable(
	v.picklist([
		...weaponCategories.map((category) => category.name),
		"SUBS",
		"SPECIALS",
	]),
)
nullfalse

Same as weaponLandingSearchParams.shape.category

ap
v.pipe(
	v.number(),
	v.integer(),
	v.check((value) => possibleApValues().includes(value)),
)
0false
dmg v.nullable(v.picklist(DAMAGE_TYPE))nullfalse
multi v.boolean()truefalse

Used in calculator-hooks.tscalculator-urls.tsobject-damage-calculator.tsx