about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-03-24 09:57:05 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-03-24 09:57:05 -0400
commit37be40c8129ccaa3cd26629c383f1d9d03523366 (patch)
treec62adc5224ed3330a662313e0594381d3d152362 /Archipelago
parent5a555c5c07bdddc5b106e377ef38ca7852e7de70 (diff)
downloadlingo-archipelago-37be40c8129ccaa3cd26629c383f1d9d03523366.tar.gz
lingo-archipelago-37be40c8129ccaa3cd26629c383f1d9d03523366.tar.bz2
lingo-archipelago-37be40c8129ccaa3cd26629c383f1d9d03523366.zip
Geronimo gets you a puzzle skip
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd20
-rw-r--r--Archipelago/load.gd3
2 files changed, 21 insertions, 2 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 06fb3a6..05294d5 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -115,6 +115,7 @@ var _puzzle_skips = 0
115var _cached_slowness = 0 115var _cached_slowness = 0
116var _cached_iceland = 0 116var _cached_iceland = 0
117var _cached_atbash = 0 117var _cached_atbash = 0
118var _geronimo_skip = false
118 119
119signal could_not_connect 120signal could_not_connect
120signal connect_status 121signal connect_status
@@ -300,7 +301,7 @@ func _on_data():
300 301
301 if localdata.size() > 1: 302 if localdata.size() > 1:
302 _puzzle_skips = localdata[1] 303 _puzzle_skips = localdata[1]
303 304
304 if localdata.size() > 2: 305 if localdata.size() > 2:
305 _cached_slowness = localdata[2] 306 _cached_slowness = localdata[2]
306 else: 307 else:
@@ -316,6 +317,11 @@ func _on_data():
316 else: 317 else:
317 _cached_atbash = 0 318 _cached_atbash = 0
318 319
320 if localdata.size() > 5:
321 _geronimo_skip = localdata[5]
322 else:
323 _geronimo_skip = false
324
319 requestSync() 325 requestSync()
320 326
321 emit_signal("client_connected") 327 emit_signal("client_connected")
@@ -475,7 +481,8 @@ func saveLocaldata():
475 _puzzle_skips, 481 _puzzle_skips,
476 effects_node.slowness_remaining, 482 effects_node.slowness_remaining,
477 effects_node.iceland_remaining, 483 effects_node.iceland_remaining,
478 effects_node.atbash_remaining 484 effects_node.atbash_remaining,
485 _geronimo_skip
479 ] 486 ]
480 file.store_var(data, true) 487 file.store_var(data, true)
481 file.close() 488 file.close()
@@ -720,6 +727,15 @@ func usePuzzleSkip():
720 saveLocaldata() 727 saveLocaldata()
721 728
722 729
730func geronimo():
731 if !_geronimo_skip:
732 messages.showMessage("Geronimo! You found a puzzle skip.")
733
734 _puzzle_skips += 1
735 _geronimo_skip = true
736 saveLocaldata()
737
738
723func colorForItemType(flags): 739func colorForItemType(flags):
724 var int_flags = int(flags) 740 var int_flags = int(flags)
725 if int_flags & 1: # progression 741 if int_flags & 1: # progression
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 66c9b8a..207550b 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -577,6 +577,9 @@ func _load():
577 var multiplayer_node = apclient.SCRIPT_multiplayer.new() 577 var multiplayer_node = apclient.SCRIPT_multiplayer.new()
578 multiplayer_node.ghost_mode = true 578 multiplayer_node.ghost_mode = true
579 add_child(multiplayer_node) 579 add_child(multiplayer_node)
580
581 # Hook up Geronimo handler.
582 $player.connect("player_jumped", apclient, "geronimo")
580 583
581 # Hook up the scene to be able to handle connection failures. 584 # Hook up the scene to be able to handle connection failures.
582 apclient.connect("could_not_connect", self, "archipelago_disconnected") 585 apclient.connect("could_not_connect", self, "archipelago_disconnected")