Implement RCON weapon icon alias mapping

This commit is contained in:
devRaGonSa
2026-06-09 17:31:19 +02:00
parent 3ddfcc5802
commit 00ad0ae861
4 changed files with 687 additions and 1 deletions

View File

@@ -526,6 +526,14 @@ function renderKillFeedTeamBadge(team) {
}
function resolveKillFeedWeapon(value) {
const runtimeWeaponIcons = globalThis.HLL_VIETNAM_CURRENT_MATCH_WEAPON_ICONS;
if (runtimeWeaponIcons?.lookup) {
const runtimeKey = runtimeWeaponIcons.normalize(value);
return runtimeWeaponIcons.lookup[runtimeKey] || {
label: String(value || runtimeWeaponIcons.unknown.label),
icon: runtimeWeaponIcons.unknown.icon,
};
}
const key = normalizeLookupText(value);
return CURRENT_MATCH_WEAPONS[key] || {
label: String(value || CURRENT_MATCH_WEAPONS.unknown.label),