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.gd45
1 files changed, 42 insertions, 3 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 788f6ca..58a099c 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -15,8 +15,8 @@ var ap_pass = ""
15var confusify_world = false 15var confusify_world = false
16var enable_multiplayer = false 16var enable_multiplayer = false
17 17
18const my_version = "1.1.0" 18const my_version = "2.0.0-beta2"
19const ap_version = {"major": 0, "minor": 4, "build": 4, "class": "Version"} 19const ap_version = {"major": 0, "minor": 4, "build": 5, "class": "Version"}
20const color_items = [ 20const color_items = [
21 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" 21 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow"
22] 22]
@@ -49,6 +49,19 @@ const progressive_items = {
49 [ 49 [
50 {"item": "The Fearless (First Floor) - Second Floor", "display": "Second Floor"}, 50 {"item": "The Fearless (First Floor) - Second Floor", "display": "Second Floor"},
51 {"item": "The Fearless (Second Floor) - Third Floor", "display": "Third Floor"}, 51 {"item": "The Fearless (Second Floor) - Third Floor", "display": "Third Floor"},
52 ],
53 "Progressive Colorful":
54 [
55 {"item": "The Colorful - White Door", "display": "White"},
56 {"item": "The Colorful - Black Door", "display": "Black"},
57 {"item": "The Colorful - Red Door", "display": "Red"},
58 {"item": "The Colorful - Yellow Door", "display": "Yellow"},
59 {"item": "The Colorful - Blue Door", "display": "Blue"},
60 {"item": "The Colorful - Purple Door", "display": "Purple"},
61 {"item": "The Colorful - Orange Door", "display": "Orange"},
62 {"item": "The Colorful - Green Door", "display": "Green"},
63 {"item": "The Colorful - Brown Door", "display": "Brown"},
64 {"item": "The Colorful - Gray Door", "display": "Gray"},
52 ] 65 ]
53} 66}
54 67
@@ -112,6 +125,9 @@ var _progressive_progress = {}
112var _has_colors = ["white"] 125var _has_colors = ["white"]
113var _received_indexes = [] 126var _received_indexes = []
114var _puzzle_skips = 0 127var _puzzle_skips = 0
128var _cached_slowness = 0
129var _cached_iceland = 0
130var _cached_atbash = 0
115 131
116signal could_not_connect 132signal could_not_connect
117signal connect_status 133signal connect_status
@@ -298,6 +314,21 @@ func _on_data():
298 if localdata.size() > 1: 314 if localdata.size() > 1:
299 _puzzle_skips = localdata[1] 315 _puzzle_skips = localdata[1]
300 316
317 if localdata.size() > 2:
318 _cached_slowness = localdata[2]
319 else:
320 _cached_slowness = 0
321
322 if localdata.size() > 3:
323 _cached_iceland = localdata[3]
324 else:
325 _cached_iceland = 0
326
327 if localdata.size() > 4:
328 _cached_atbash = localdata[4]
329 else:
330 _cached_atbash = 0
331
301 requestSync() 332 requestSync()
302 333
303 emit_signal("client_connected") 334 emit_signal("client_connected")
@@ -450,7 +481,15 @@ func saveLocaldata():
450 var file = File.new() 481 var file = File.new()
451 file.open(_localdata_file, File.WRITE) 482 file.open(_localdata_file, File.WRITE)
452 483
453 var data = [_last_new_item, _puzzle_skips] 484 var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects")
485
486 var data = [
487 _last_new_item,
488 _puzzle_skips,
489 effects_node.slowness_remaining,
490 effects_node.iceland_remaining,
491 effects_node.atbash_remaining
492 ]
454 file.store_var(data, true) 493 file.store_var(data, true)
455 file.close() 494 file.close()
456 495