4.6 KiB
4.6 KiB
id, title, status, type, team, supporting_teams, roadmap_item, priority
| id | title | status | type | team | supporting_teams | roadmap_item | priority | |
|---|---|---|---|---|---|---|---|---|
| TASK-209 | Implement RCON weapon icon alias mapping | done | frontend | Frontend Senior |
|
foundation | high |
TASK-209 - Implement RCON weapon icon alias mapping
Goal
Implement the full RCON weapon-to-icon mapping in frontend JavaScript using explicit aliases and the frontend/assets/img/weapons/black/ icon set, without modifying SVG files.
Context
TASK-208 produced the reviewable mapping matrix between the pasted RCON weapon universe and the local black silhouettes. The runtime still uses an older partial white/ mapping in frontend/assets/js/partida-actual.js, with legacy filenames and incomplete coverage.
This task applies the documented mapping in frontend code only:
- cover the 220 documented RCON weapons plus
UNKNOWN - use actual
blackSVG filenames - preserve legacy/ambiguous cases through explicit aliases
- keep SVG files untouched
Steps
- Inspect the analysis document, current runtime resolver and actual
blackicon filenames. - Replace the partial runtime weapon mapping with the documented full alias mapping.
- Add local validation that checks mapping coverage and that assigned icon filenames exist in
frontend/assets/img/weapons/black/. - Update documentation with implementation notes and validation results.
Files to Read First
AGENTS.mdai/repo-context.mdai/architecture-index.mddocs/weapon-icon-black-mapping-analysis.mdai/tasks/done/TASK-208-analyze-weapon-icons-black-folder-mapping.mdfrontend/assets/js/partida-actual.js
Expected Files to Modify
frontend/assets/js/current-match-weapon-icons.jsfrontend/assets/js/partida-actual.jsfrontend/partida-actual.htmldocs/weapon-icon-black-mapping-analysis.mdai/tasks/done/TASK-209-implement-rcon-weapon-icon-alias-mapping.md
Constraints
- Do not modify, rename, delete, replace or move SVG files.
- Do not touch backend code, endpoints or scripts.
- Do not touch
ai/system-metrics.md. - Do not push.
- Keep aliases explicit and reviewable.
- Use existing
blackfilenames even when they are legacy or inconsistent.
Validation
Before completing the task ensure:
node --check frontend/assets/js/partida-actual.js- a local script confirms all documented RCON names resolve to an existing
blackSVG or to the documented fallback UI path git diff --name-onlymatches the expected scopegit status --short --untracked-files=allconfirms no SVGs were modified by this task
Outcome
Document:
- the JS file modified
- alias strategy used
- number of covered weapons
- implemented fallback cases
- validation results
- confirmation that no SVG or backend file was touched
Result:
- Added
frontend/assets/js/current-match-weapon-icons.jswith:123realblackfilenames220explicit RCONweapon -> svgentries120legacy/colloquial aliases for runtime lookup
- Updated
frontend/partida-actual.htmlto load the new runtime mapping beforepartida-actual.js. - Updated
frontend/assets/js/partida-actual.jsso killfeed weapon resolution now prefers the completeblackruntime mapping and falls back to the old local resolver only if the new asset is unavailable. - Updated
docs/weapon-icon-black-mapping-analysis.mdwith anImplementación aplicadasection.
Validation performed:
- PASS:
node --check frontend/assets/js/partida-actual.js - PASS:
node --check frontend/assets/js/current-match-weapon-icons.js - PASS: local Node validation against the analysis document and runtime mapping:
totalWeapons = 220mappedWeapons = 220totalIcons = 123usedIcons = 123aliasCount = 120missingWeapons = 0brokenIcons = 0missingAliases = 0unusedIcons = 0
- PASS: reviewed
git diff --name-only - PASS: reviewed
git status --short --untracked-files=all
Main implemented fallbacks:
UNKNOWN -> precision_strike_black.svgMOLOTOV -> rg42_grenade_black.svgNo.77 -> no82_grenade_black.svgDaimlerandQF 2-POUNDER [Daimler]/COAXIAL BESA [Daimler] -> m8_greyhound_black.svgGAZ-67 -> jeep_black.svg122MM HOWITZER [M1938 (M-30)] -> zis2_57mm_cannon_black.svg155MM HOWITZER [M114] -> m1_57mm_cannon_black.svg150MM HOWITZER [sFH 18] -> pak_40_75mm_black.svgFLAMETHROWER -> m2_flamethrower_black.svgFairbairnSykes -> m3_knife_black.svg
Scope confirmation:
- No SVG was modified, renamed, deleted or replaced.
- No backend file, endpoint or backend script was touched.
- No push was made.
Change Budget
- Prefer fewer than 5 modified files.
- Split follow-up cleanups, visual tuning or future icon creation into separate tasks.