about summary refs log tree commit diff stats
path: root/Archipelago/client.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-03-15 14:09:04 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-03-15 14:09:04 -0400
commit4706f9205b80591f06c5ab0f171e6b6f91cfae9c (patch)
treed6ca472f0b879e4a9da6db51803558955537a44d /Archipelago/client.gd
parent0e1c0f8c4643ddf972f03922df9152b737ef4641 (diff)
parentceaff99432d67411de07ab8e5b6aa11911624566 (diff)
downloadlingo-archipelago-4706f9205b80591f06c5ab0f171e6b6f91cfae9c.tar.gz
lingo-archipelago-4706f9205b80591f06c5ab0f171e6b6f91cfae9c.tar.bz2
lingo-archipelago-4706f9205b80591f06c5ab0f171e6b6f91cfae9c.zip
Merge branch 'main' into future
Diffstat (limited to 'Archipelago/client.gd')
-rw-r--r--Archipelago/client.gd28
1 files changed, 27 insertions, 1 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index a7cfa23..24c8134 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -125,6 +125,9 @@ var _progressive_progress = {}
125var _has_colors = ["white"] 125var _has_colors = ["white"]
126var _received_indexes = [] 126var _received_indexes = []
127var _puzzle_skips = 0 127var _puzzle_skips = 0
128var _cached_slowness = 0
129var _cached_iceland = 0
130var _cached_atbash = 0
128 131
129signal could_not_connect 132signal could_not_connect
130signal connect_status 133signal connect_status
@@ -311,6 +314,21 @@ func _on_data():
311 if localdata.size() > 1: 314 if localdata.size() > 1:
312 _puzzle_skips = localdata[1] 315 _puzzle_skips = localdata[1]
313 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
314 requestSync() 332 requestSync()
315 333
316 emit_signal("client_connected") 334 emit_signal("client_connected")
@@ -463,7 +481,15 @@ func saveLocaldata():
463 var file = File.new() 481 var file = File.new()
464 file.open(_localdata_file, File.WRITE) 482 file.open(_localdata_file, File.WRITE)
465 483
466 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 ]
467 file.store_var(data, true) 493 file.store_var(data, true)
468 file.close() 494 file.close()
469 495