Use server version

This commit is contained in:
2026-01-06 23:25:05 -06:00
parent a8c74095fe
commit e6eae4117f
2 changed files with 5 additions and 2 deletions

View File

@@ -2,8 +2,9 @@ class W3DHub
class Api
class ServerListServer
NO_OR_BAD_PING = 1_000_000
NO_OR_DEFAULT_VERSION = "838"
attr_reader :id, :game, :address, :port, :region, :channel, :ping, :status
attr_reader :id, :game, :address, :port, :region, :channel, :version, :ping, :status
def initialize(hash)
@data = hash
@@ -14,6 +15,7 @@ class W3DHub
@port = @data[:port]
@region = @data[:region]
@channel = @data[:channel] || "release"
@version = @data[:version] || NO_OR_DEFAULT_VERSION
@ping = NO_OR_BAD_PING
@status = Status.new(@data[:status])