diff options
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/client.gd | 6 | ||||
-rw-r--r-- | Archipelago/settings_screen.gd | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 0f121a1..bdd3905 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -18,6 +18,7 @@ const uuid_util = preload("user://maps/Archipelago/vendor/uuid.gd") | |||
18 | 18 | ||
19 | # TODO: caching per MW/slot, reset between connections | 19 | # TODO: caching per MW/slot, reset between connections |
20 | var _authenticated = false | 20 | var _authenticated = false |
21 | var _seed = "" | ||
21 | var _team = 0 | 22 | var _team = 0 |
22 | var _slot = 0 | 23 | var _slot = 0 |
23 | var _players = [] | 24 | var _players = [] |
@@ -90,6 +91,7 @@ func _on_data(): | |||
90 | global._print("Received command: " + cmd) | 91 | global._print("Received command: " + cmd) |
91 | 92 | ||
92 | if cmd == "RoomInfo": | 93 | if cmd == "RoomInfo": |
94 | _seed = message["seed_name"] | ||
93 | if message["datapackage_checksums"].has("Lingo"): | 95 | if message["datapackage_checksums"].has("Lingo"): |
94 | if _datapackage_checksum != message["datapackage_checksums"]["Lingo"]: | 96 | if _datapackage_checksum != message["datapackage_checksums"]["Lingo"]: |
95 | requestDatapackage() | 97 | requestDatapackage() |
@@ -171,6 +173,10 @@ func saveSettings(): | |||
171 | file.close() | 173 | file.close() |
172 | 174 | ||
173 | 175 | ||
176 | func getSaveFileName(): | ||
177 | return "zzAP_%s_%d" % [_seed, _slot] | ||
178 | |||
179 | |||
174 | func connectToServer(): | 180 | func connectToServer(): |
175 | var url = "ws://" + ap_server | 181 | var url = "ws://" + ap_server |
176 | var err = _client.connect_to_url(url) | 182 | var err = _client.connect_to_url(url) |
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 9624693..06bebd1 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
@@ -48,7 +48,10 @@ func installScriptExtension(childScriptPath: String): | |||
48 | 48 | ||
49 | 49 | ||
50 | func connectionSuccessful(): | 50 | func connectionSuccessful(): |
51 | var apclient = global.get_node("Archipelago") | ||
52 | |||
51 | # Switch to LL1 | 53 | # Switch to LL1 |
52 | Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) | 54 | Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) |
53 | global.map = "level1" | 55 | global.map = "level1" |
56 | global.save_file = apclient.getSaveFileName() | ||
54 | var _discard = get_tree().change_scene("res://scenes/load_screen.tscn") | 57 | var _discard = get_tree().change_scene("res://scenes/load_screen.tscn") |