From c1a96429611a70205331b7946e23eb88acbab3d4 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Mon, 30 Jun 2025 00:18:04 +0200 Subject: [PATCH] Refactor knife exclusion logic in index.php to comprehensively skip all knife-related weapons during display, enhancing clarity in weapon selection. Update comments for better understanding of the logic flow. --- website/index.php | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/website/index.php b/website/index.php index 61b703c9..4d310028 100644 --- a/website/index.php +++ b/website/index.php @@ -243,6 +243,7 @@ if (isset($_SESSION['steamid'])) { ?> +
@@ -265,10 +266,22 @@ if (isset($_SESSION['steamid'])) {
+ $weapon): ?> - + " alt="" class="item-image"> -
- -
+
@@ -304,7 +315,6 @@ if (isset($_SESSION['steamid'])) {
- @@ -580,6 +590,11 @@ if (isset($_SESSION['steamid'])) { if (skinsData[knifeType]) { // This knife type has multiple skins Object.entries(skinsData[knifeType]).forEach(([paintId, skin]) => { + // Skip the default skin (paint ID 0) since we already show it as "Default" option above + if (paintId == '0') { + return; + } + const skinOption = document.createElement('div'); skinOption.className = 'skin-option';