Package selection and downloading functional

This commit is contained in:
2026-09-14 14:21:40 -05:00
parent db0dd9fc7c
commit 4ba71b760a
6 changed files with 218 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ module W3DHubLauncher
Response = Data.define(:status, :request_id, :result)
attr_reader :w3dhub_api
attr_reader :w3dhub_api, :settings
def initialize
end
@@ -35,7 +35,7 @@ module W3DHubLauncher
@client = nil
@settings = 0# Settings.new
@settings = nil
@game_servers = []
@host_pings = {}
@@ -325,6 +325,7 @@ module W3DHubLauncher
begin
if File.exist?(path) && File.size(path).positive?
json = File.read(path)
@settings = Api::Settings.new(JSON.parse(json))
result.data = json
else
result.error = RuntimeError.new("Launcher settings file does not exist or is empty.")