From 4fa7d3f8d1b1749ccaa93eca711876b2aae4bd65 Mon Sep 17 00:00:00 2001 From: MokaAkashiya85 Date: Wed, 5 Feb 2025 19:53:22 +0100 Subject: [PATCH] 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. --- lua/arc9/client/cl_subcategories.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/arc9/client/cl_subcategories.lua b/lua/arc9/client/cl_subcategories.lua index 5bf30bbd..8f0b64df 100644 --- a/lua/arc9/client/cl_subcategories.lua +++ b/lua/arc9/client/cl_subcategories.lua @@ -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