Can now join a server and launch installed games (Play Now does nothing special yet)

This commit is contained in:
2021-11-19 15:48:13 -06:00
parent ec81959947
commit 89f7f4ab6a
9 changed files with 141 additions and 40 deletions

View File

@@ -83,6 +83,17 @@ class W3DHub
end
end
def join_server(app_id, channel, server, password = nil)
if installed?(app_id, channel) && window.settings[:server_list_username].to_s.length.positive?
run(
app_id, channel,
"+connect #{server.address}:#{server.port}",
"+netplayername \"#{window.settings[:server_list_username]}\"",
password ? "+password \"#{password}\"" : ""
)
end
end
def installed!(task)
# install_dir
# installed_version