4.7 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority |
|---|---|---|---|---|---|---|---|
| TASK-232 | Audit and fix weapon icon assets and RCON mapping | done | frontend | Frontend Senior | foundation | high |
TASK-232 - Audit and fix weapon icon assets and RCON mapping
Goal
Use the current local SVG files from frontend/assets/img/weapons/black/ for weapon icons shown in current match and historical weapon views, avoid broken/legacy asset references, and document covered and pending RCON names.
Context
The local black/ weapon icon folder changed substantially: new SVGs were added and several old typo filenames were deleted or renamed. The frontend needed to keep using the local black SVG set and avoid legacy bad-quality or missing paths.
Files Read First
ai/architecture-index.mdai/repo-context.mdai/orchestrator/frontend-senior.mdfrontend/assets/js/current-match-weapon-icons.jsfrontend/assets/js/partida-actual.jsfrontend/assets/js/historico-partida.jsfrontend/partida-actual.htmlfrontend/historico-partida.html
Expected Files Modified
frontend/assets/js/current-match-weapon-icons.jsfrontend/assets/js/partida-actual.jsfrontend/assets/js/historico-partida.jsfrontend/historico-partida.htmlfrontend/assets/css/historico.cssscripts/validate-weapon-icon-mapping.jsdocs/WEAPON_ICON_MAPPING_AUDIT.md- this task file
Changes
- Removed the operational
weapons/white/fallback map frompartida-actual.js. - Kept current match kill feed resolution on the shared
black/runtime resolver. - Added aliases for
FG42 x4variants andMP 40. - Removed legacy typo alias strings from runtime JS:
flammenwefer41,m1 carabine,panzerchreck. - Loaded
current-match-weapon-icons.jsinhistorico-partida.html. - Rendered local black weapon icons in historical player detail sections for
top_weaponsanddeath_by. - Added CSS for historical weapon icon rows.
- Added
scripts/validate-weapon-icon-mapping.jsto validate declared SVGs, mapped SVGs and forbidden legacy terms. - Created
docs/WEAPON_ICON_MAPPING_AUDIT.md.
Asset Inventory
- Current local SVG count in
frontend/assets/img/weapons/black/: 123. - Modified tracked SVGs: 29 existing files.
- Deleted tracked typo/obsolete SVGs: 9 files.
- New/untracked local SVGs: 94 files.
- Duplicate by hash:
lee_enfield_jungle_carbine_black.svgandrifle_no5_mk_i_black.svg.
Corrected local filenames now used include:
browning_m1919_black.svgm1_carbine_black.svgpanzerschreck_black.svgflammenwerfer41_black.svgmosin_nagant_1891_black.svgmosin_nagant_9130_black.svgmosin_nagant_m38_black.svg
RCON/API Names Reviewed
Production endpoints sampled:
/api/current-match/killsforcomunidad-hispana-01/api/current-match/killsforcomunidad-hispana-02/api/current-match/playersforcomunidad-hispana-01/api/current-match/playersforcomunidad-hispana-02/api/historical/matches/detail?server=comunidad-hispana-01&match=1781023156:1781028555:purpleheartlanewarfare
The endpoints responded but did not expose weapon names in the sampled payloads at audit time. Coverage is therefore based on the repository RCON universe already implemented in CURRENT_MATCH_RCON_WEAPON_ICON_ENTRIES.
Representative covered names include GEWEHR 43, KARABINER 98K, KARABINER 98K x8, FG42, FG42 x4, M1 GARAND, M1 CARBINE, BROWNING M1919, STG44, MP40, MG42, BAZOOKA, PANZERSCHRECK, PIAT, BOMBING RUN, STRAFING RUN, SATCHEL, PRECISION STRIKE, UNKNOWN, common mines, grenades, trucks, jeeps, half-tracks, tanks and mounted cannons.
Pending Without Dedicated Icon
These names are covered by controlled fallback mappings but still lack dedicated icons:
UNKNOWNMOLOTOVNo.77DaimlerGAZ-67DP-27FairbairnSykes122MM HOWITZER [M1938 (M-30)]150MM HOWITZER [sFH 18]155MM HOWITZER [M114]
Validation
Passed:
node --check frontend/assets/js/current-match-weapon-icons.js
node --check frontend/assets/js/partida-actual.js
node --check frontend/assets/js/historico-partida.js
node scripts/validate-weapon-icon-mapping.js
Also reviewed:
git status --short --untracked-files=all
git diff --name-only
Outcome
The current match kill feed and historical match detail weapon lists now use the shared local black SVG resolver. No runtime mapping points to missing SVGs. The old white-path fallback and legacy typo asset filenames are no longer used by frontend JS.
No backend, RCON configuration, server ports, 27001, Elo/MMR, Comunidad Hispana #03, clan assets, tmp/, black - copia/, black.zip or ai/system-metrics.md were touched by this task.