mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-09-20 23:33:54 +00:00
Package selection and downloading functional
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user