From b58f202e9e1ef11dc58098c2d4132e4093bbc4cf Mon Sep 17 00:00:00 2001 From: buthed010203 Date: Mon, 19 Jul 2021 20:57:36 -0400 Subject: [PATCH] Allow hiding of steam servers (#5618) * Allow hiding of steam servers Theres no way to hide them while keeping them public in the steam api so instead this jank is needed. This wont do anything on a vanilla install but will allow people hosting headless steam servers to hide them if they only use the server to verify if players are on steam or not. * Hide only when hidden = true --- desktop/src/mindustry/desktop/steam/SNet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop/src/mindustry/desktop/steam/SNet.java b/desktop/src/mindustry/desktop/steam/SNet.java index 92b8803f85..d4b8236afa 100644 --- a/desktop/src/mindustry/desktop/steam/SNet.java +++ b/desktop/src/mindustry/desktop/steam/SNet.java @@ -312,6 +312,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback, for(int i = 0; i < matches; i++){ try{ SteamID lobby = smat.getLobbyByIndex(i); + if(smat.getLobbyData(lobby, "hidden").equals("true")) continue; String mode = smat.getLobbyData(lobby, "gamemode"); //make sure versions are equal, don't list incompatible lobbies if(mode == null || mode.isEmpty() || (Version.build != -1 && Strings.parseInt(smat.getLobbyData(lobby, "version"), -1) != Version.build)) continue;