Update cl_subcategories.lua

- If the subcategory name for the weapon starts with a number, it is visually removed. Does not alter category sorting order, so "1B" will always be above "2A" for example.
This commit is contained in:
MokaAkashiya85 2025-02-05 19:53:22 +01:00
parent da9dbbe37e
commit 4fa7d3f8d1

View File

@ -84,6 +84,11 @@ hook.Add("PopulateWeapons", "zzz_ARC9_SubCategories", function(pnlContent, tree,
-- Create the subcategory header, if more than one exists for this category
if (table.Count(catSubcats) > 1) then
local label = vgui.Create("ContentHeader", container)
if subcatName:sub(1, 1):match("%d") then
subcatName = string.sub(subcatName, 2)
end
label:SetText(subcatName)
self.PropPanel:Add(label)
end