diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-03 14:31:51 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-04-03 14:31:51 -0400 |
commit | 38175bd12c1a0a2c80be5f4011f69e4659f61ccd (patch) | |
tree | 6e110740dfeaf024c7bf4c46b0eb3cd18bdf4876 /Archipelago/client.gd | |
parent | 0b1ea0dbc89b231d2b4847d0fb7dc5b23e060b0c (diff) | |
download | lingo-archipelago-38175bd12c1a0a2c80be5f4011f69e4659f61ccd.tar.gz lingo-archipelago-38175bd12c1a0a2c80be5f4011f69e4659f61ccd.tar.bz2 lingo-archipelago-38175bd12c1a0a2c80be5f4011f69e4659f61ccd.zip |
Added player position tracking
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r-- | Archipelago/client.gd | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 47357ee..b825aaa 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -14,6 +14,7 @@ var ap_user = "" | |||
14 | var ap_pass = "" | 14 | var ap_pass = "" |
15 | var confusify_world = false | 15 | var confusify_world = false |
16 | var enable_multiplayer = false | 16 | var enable_multiplayer = false |
17 | var track_player = false | ||
17 | 18 | ||
18 | const my_version = "2.0.0" | 19 | const my_version = "2.0.0" |
19 | const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} | 20 | const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"} |
@@ -158,6 +159,8 @@ func _init(): | |||
158 | confusify_world = data[4] | 159 | confusify_world = data[4] |
159 | if data.size() > 5: | 160 | if data.size() > 5: |
160 | enable_multiplayer = data[5] | 161 | enable_multiplayer = data[5] |
162 | if data.size() > 6: | ||
163 | track_player = data[6] | ||
161 | 164 | ||
162 | processDatapackages() | 165 | processDatapackages() |
163 | 166 | ||
@@ -298,6 +301,11 @@ func _on_data(): | |||
298 | if _slot_data.has("early_color_hallways"): | 301 | if _slot_data.has("early_color_hallways"): |
299 | _early_color_hallways = _slot_data["early_color_hallways"] | 302 | _early_color_hallways = _slot_data["early_color_hallways"] |
300 | 303 | ||
304 | if track_player: | ||
305 | setValue("PlayerPos", {"x": 0, "z": 0}) | ||
306 | else: | ||
307 | setValue("PlayerPos", null) | ||
308 | |||
301 | _puzzle_skips = 0 | 309 | _puzzle_skips = 0 |
302 | 310 | ||
303 | _localdata_file = "user://archipelago_data/%s_%d" % [_seed, _slot] | 311 | _localdata_file = "user://archipelago_data/%s_%d" % [_seed, _slot] |
@@ -470,7 +478,15 @@ func saveSettings(): | |||
470 | var file = File.new() | 478 | var file = File.new() |
471 | file.open("user://settings/archipelago", File.WRITE) | 479 | file.open("user://settings/archipelago", File.WRITE) |
472 | 480 | ||
473 | var data = [ap_server, ap_user, ap_pass, _datapackages, confusify_world, enable_multiplayer] | 481 | var data = [ |
482 | ap_server, | ||
483 | ap_user, | ||
484 | ap_pass, | ||
485 | _datapackages, | ||
486 | confusify_world, | ||
487 | enable_multiplayer, | ||
488 | track_player | ||
489 | ] | ||
474 | file.store_var(data, true) | 490 | file.store_var(data, true) |
475 | file.close() | 491 | file.close() |
476 | 492 | ||