Server Browser is now properly updated like the offical launcher- just a bit more flashy due to taking 100+ ms to regenerate ui elements

This commit is contained in:
2021-12-30 18:56:56 -06:00
parent 1214c35fb5
commit 1b91191d90
4 changed files with 46 additions and 36 deletions

View File

@@ -177,7 +177,7 @@ class W3DHub
return data.map { |hash| ServerListServer.new(hash) }
end
pp response
false
end
# /listings/getStatus/v2/:id?statusLevel=#{0-2}
@@ -192,6 +192,14 @@ class W3DHub
# ...players[]:
# nick, team (index of teams array), score, kills, deaths
def self.server_details(internet, id, level)
response = internet.get("#{SERVER_LIST_ENDPOINT}/listings/getStatus/v2/#{id}?statusLevel=#{level}", DEFAULT_HEADERS)
if response.success?
hash = JSON.parse(response.read, symbolize_names: true)
return hash
end
false
end
# /listings/push/v2/negotiate?negotiateVersion=1