subnav and other stuff
This commit is contained in:
@@ -27,14 +27,76 @@ export const CATEGORY_TO_PART_ROLES: Record<CategoryId, string[]> = {
|
||||
gasTube: ["gas-tube"],
|
||||
muzzleDevice: ["muzzle-device", "compensator", "brake"],
|
||||
suppressor: ["suppressor"],
|
||||
|
||||
// ===== ACCESSORIES =====
|
||||
|
||||
// Magazines
|
||||
magazine: [
|
||||
"magazine",
|
||||
"mag",
|
||||
"magazine-ar15",
|
||||
"magazine-308",
|
||||
"drum-magazine",
|
||||
],
|
||||
|
||||
// Lights / Lasers
|
||||
weaponLight: [
|
||||
"weapon-light",
|
||||
"light",
|
||||
"weapon-light-laser",
|
||||
"light-laser-combo",
|
||||
"laser",
|
||||
],
|
||||
|
||||
// Foregrips
|
||||
foregrip: [
|
||||
"vertical-grip",
|
||||
"angled-foregrip",
|
||||
"foregrip",
|
||||
"handstop",
|
||||
],
|
||||
|
||||
// Bipods
|
||||
bipod: [
|
||||
"bipod",
|
||||
],
|
||||
|
||||
// Slings & mounts
|
||||
sling: [
|
||||
"sling",
|
||||
"sling-mount",
|
||||
"sling-swivel",
|
||||
"qd-sling-mount",
|
||||
],
|
||||
|
||||
// Rail sections & covers
|
||||
railAccessory: [
|
||||
"rail-section",
|
||||
"picatinny-rail-section",
|
||||
"m-lok-rail-section",
|
||||
"keymod-rail-section",
|
||||
"rail-cover",
|
||||
"rail-panel",
|
||||
],
|
||||
|
||||
// Tools & maintenance
|
||||
tools: [
|
||||
"tool",
|
||||
"armorer-tool",
|
||||
"armorer-wrench",
|
||||
"cleaning-kit",
|
||||
"bore-snake",
|
||||
"vise-block",
|
||||
"torque-wrench",
|
||||
],
|
||||
};
|
||||
|
||||
// Invert to get partRole -> CategoryId
|
||||
export const PART_ROLE_TO_CATEGORY: Record<string, CategoryId> = Object
|
||||
.entries(CATEGORY_TO_PART_ROLES)
|
||||
.reduce((acc, [categoryId, roles]) => {
|
||||
for (const role of roles) {
|
||||
acc[role] = categoryId as CategoryId;
|
||||
}
|
||||
return acc;
|
||||
}, {} as Record<string, CategoryId>);
|
||||
export const PART_ROLE_TO_CATEGORY: Record<string, CategoryId> = Object.entries(
|
||||
CATEGORY_TO_PART_ROLES,
|
||||
).reduce((acc, [categoryId, roles]) => {
|
||||
for (const role of roles) {
|
||||
acc[role] = categoryId as CategoryId;
|
||||
}
|
||||
return acc;
|
||||
}, {} as Record<string, CategoryId>);
|
||||
Reference in New Issue
Block a user