From 5bcf3b8741e30e4c59aba56b564a922ae86e5603 Mon Sep 17 00:00:00 2001 From: Darxo Date: Sat, 4 Jul 2026 17:30:03 +0200 Subject: [PATCH] fix: weapon type detection from cateogories not using the correct names Vanilla uses the weapon names from ::Const.Items.WeaponTypeName in this.m.Categories The only reason that this code worked is, because the keys from ::Const.Items.WeaponType happen to be an exact subset of their respective full names --- msu/hooks/items/weapons/weapon.nut | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msu/hooks/items/weapons/weapon.nut b/msu/hooks/items/weapons/weapon.nut index 210172ee..bd55ddfe 100644 --- a/msu/hooks/items/weapons/weapon.nut +++ b/msu/hooks/items/weapons/weapon.nut @@ -62,7 +62,7 @@ foreach (k, w in ::Const.Items.WeaponType) { - if (categories.find(k) != null) + if (categories.find(::Const.Items.getWeaponTypeName(w)) != null) { this.m.WeaponType = this.m.WeaponType | w; }