about summary refs log tree commit diff stats
path: root/Archipelago/client.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r--Archipelago/client.gd32
1 files changed, 29 insertions, 3 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index b3668d7..4431fa0 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -16,8 +16,8 @@ var ap_pass = ""
16var confusify_world = false 16var confusify_world = false
17var enable_multiplayer = false 17var enable_multiplayer = false
18 18
19const my_version = "1.1.0" 19const my_version = "2.0.0-beta2"
20const ap_version = {"major": 0, "minor": 4, "build": 4, "class": "Version"} 20const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"}
21const color_items = [ 21const color_items = [
22 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" 22 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow"
23] 23]
@@ -148,6 +148,9 @@ var _progressive_progress = {}
148var _has_colors = ["white"] 148var _has_colors = ["white"]
149var _received_indexes = [] 149var _received_indexes = []
150var _puzzle_skips = 0 150var _puzzle_skips = 0
151var _cached_slowness = 0
152var _cached_iceland = 0
153var _cached_atbash = 0
151 154
152signal could_not_connect 155signal could_not_connect
153signal connect_status 156signal connect_status
@@ -346,6 +349,21 @@ func _on_data():
346 if localdata.size() > 1: 349 if localdata.size() > 1:
347 _puzzle_skips = localdata[1] 350 _puzzle_skips = localdata[1]
348 351
352 if localdata.size() > 2:
353 _cached_slowness = localdata[2]
354 else:
355 _cached_slowness = 0
356
357 if localdata.size() > 3:
358 _cached_iceland = localdata[3]
359 else:
360 _cached_iceland = 0
361
362 if localdata.size() > 4:
363 _cached_atbash = localdata[4]
364 else:
365 _cached_atbash = 0
366
349 requestSync() 367 requestSync()
350 368
351 emit_signal("client_connected") 369 emit_signal("client_connected")
@@ -498,7 +516,15 @@ func saveLocaldata():
498 var file = File.new() 516 var file = File.new()
499 file.open(_localdata_file, File.WRITE) 517 file.open(_localdata_file, File.WRITE)
500 518
501 var data = [_last_new_item, _puzzle_skips] 519 var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects")
520
521 var data = [
522 _last_new_item,
523 _puzzle_skips,
524 effects_node.slowness_remaining,
525 effects_node.iceland_remaining,
526 effects_node.atbash_remaining
527 ]
502 file.store_var(data, true) 528 file.store_var(data, true)
503 file.close() 529 file.close()
504 530