From c788f6539370e7f2f108a6f2d5a79ed93bed0acb Mon Sep 17 00:00:00 2001 From: void Date: Wed, 6 Nov 2024 17:14:44 +0000 Subject: [PATCH] Update README.md --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index def86a5..b0c44fd 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,21 @@ A simple Terminal-Based Game Launcher. Can be tweaked, i don't really care. (LINUX ONLY, READ BELOW FOR OTHER OPERATING SYSTEMS) -On the last line of the `joingame()` function, I used "xdg-open" to open the roblox-player: link. This can be substituted for whatever macOS, Windows, or any other operating system uses. +On the last line of the `joinGame()` function, I used "xdg-open" to open the roblox-player: link. This can be substituted for "start" (Windows) and "open" (macOS) -I believe for windows it is `start` and for macOS it is `open` \ No newline at end of file +You could also probably make joining a server work, just add another argument for `joinGame()`, and replace the following code + +FROM: +```py +available_games = [game for game in data if (game['maxPlayers'] - game['playing']) >= 3] + +if available_games: + gameItem = random.choice(available_games) +else: + gameItem = {"id": None} +``` + +TO: +```py +gameItem = {"id": "YOUR_SERVER_ID_HERE"} +``` \ No newline at end of file