From 3c9fe445c945205d303962db5f3b37d766f2ae40 Mon Sep 17 00:00:00 2001 From: cialloo Date: Mon, 6 Oct 2025 19:22:55 +0800 Subject: [PATCH] Refactor server statistics to replace totalSlots with totalBots for accurate player count display --- src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index feac137..f4e981b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -43,7 +43,7 @@ function App() { // Calculate server statistics const onlineServers = servers.filter(s => s.status === 'online') const totalPlayers = onlineServers.reduce((sum, s) => sum + s.playerCount, 0) - const totalSlots = onlineServers.reduce((sum, s) => sum + s.maxPlayers, 0) + const totalBots = onlineServers.reduce((sum, s) => sum + s.botCount, 0) // Get most popular server (highest player count) const mostPopularServer = onlineServers.length > 0 @@ -260,7 +260,7 @@ function App() { color: 'var(--accent-primary)', fontWeight: 'bold' }}> - {totalPlayers}/{totalSlots} + {totalPlayers}{totalBots > 0 ? ` (+${totalBots})` : ''}