Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/lib/causes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ describe('causeLabel', () => {
expect(causeLabel('ID.Vehicle.WeaponExtension.STN_01.MistralAA')).toBe('Talon 9K-SAM');
});

test('the codenamed firearms and launcher have their names', () => {
expect(causeLabel('Id.Item.WEPN_026')).toBe('M1911');
expect(causeLabel('Id.Item.WEPN_027')).toBe('Deagle');
expect(causeLabel('Id.Item.WEPN_028')).toBe('MP5');
expect(causeLabel('Id.Item.WEPN_030')).toBe('FAL');
expect(causeLabel('Id.Item.WEPN_032')).toBe('GGX 18');
expect(causeLabel('Id.Item.WEPN_033')).toBe('Bushmaster M17S');
expect(causeLabel('Id.Item.WEPN_035')).toBe('Scout Rifle TD');
expect(causeLabel('Id.Item.SMG_03')).toBe('PP-19 Vityaz');
expect(causeLabel('Id.Item.SR_04')).toBe('AMR 50');
expect(causeLabel('Id.Item.Launcher_04')).toBe('9K333 Verba');
});

test('tags the game sends that have no name are listed in their own words', () => {
expect(causeLabel('Id.Item.SR_04')).toBe('SR 04');
expect(causeLabel('Id.Item.Launcher_04')).toBe('Launcher 04');
expect(causeLabel('Id.Item.WEPN_035')).toBe('WEPN 035');
expect(causeLabel('ID.Item.RepairTool.Drill.Light')).toBe('Light drill');
expect(causeLabel('Vehicle.Variant.Land.Wheeled.Humvee.Default')).toBe('Humvee');
expect(causeLabel('Id.Vehicle.WeaponExtension.STN_05.MainBarrel')).toBe('STN 05 main gun');
Expand Down
25 changes: 14 additions & 11 deletions src/lib/causes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ const LABELS: Record<string, string> = {
'Id.Item.RPG7': 'RPG-7',
'Id.Item.CGM4': 'MAAWS',
'Id.Item.MMGL': 'MGL-40',
// No name known: the tag's own words
'Id.Item.Launcher_04': 'Launcher 04',
'Id.Item.SMG_03': 'SMG 03',
'Id.Item.SR_04': 'SR 04',
'Id.Item.WEPN_026': 'WEPN 026',
'Id.Item.WEPN_027': 'WEPN 027',
'Id.Item.WEPN_028': 'WEPN 028',
'Id.Item.WEPN_030': 'WEPN 030',
'Id.Item.WEPN_032': 'WEPN 032',
'Id.Item.WEPN_033': 'WEPN 033',
'Id.Item.WEPN_035': 'WEPN 035',
// From a list shared among server admins, each in the class its kill distances put it in:
// three pistols, two SMGs, a bullpup with the KH-2002 and A-91, a rifle, a scout rifle, the
// longest-range rifle, and Launcher_04's kills nearly all vehicle explosions at a few hundred
// metres. Within a class (which pistol is which) the distances cannot tell.
'Id.Item.WEPN_026': 'M1911',
'Id.Item.WEPN_027': 'Deagle',
'Id.Item.WEPN_032': 'GGX 18',
'Id.Item.WEPN_028': 'MP5',
'Id.Item.SMG_03': 'PP-19 Vityaz',
'Id.Item.WEPN_033': 'Bushmaster M17S',
'Id.Item.WEPN_030': 'FAL',
'Id.Item.WEPN_035': 'Scout Rifle TD',
'Id.Item.SR_04': 'AMR 50',
'Id.Item.Launcher_04': '9K333 Verba',
// Explosives and tools
'Id.Item.M67Grenade': 'M67 frag grenade',
'Id.Item.C4Explosive': 'C4 charge',
Expand Down