about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-16 01:07:53 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-16 01:07:53 -0400
commit36eee0423e7f29e352c9c44d0ebb592007ec7436 (patch)
tree54877e1d85ee4e210fbdbfece0694f1372aa038e /Archipelago
parentb362865cc6241607af3a4046e100dc281c4c37de (diff)
downloadlingo-archipelago-36eee0423e7f29e352c9c44d0ebb592007ec7436.tar.gz
lingo-archipelago-36eee0423e7f29e352c9c44d0ebb592007ec7436.tar.bz2
lingo-archipelago-36eee0423e7f29e352c9c44d0ebb592007ec7436.zip
Added support for THE MASTER as the goal
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd4
-rw-r--r--Archipelago/load.gd16
2 files changed, 15 insertions, 5 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 905a0a1..5b4d81e 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -35,6 +35,7 @@ var _mentioned_paintings = []
35var _panel_ids_by_location = {} 35var _panel_ids_by_location = {}
36var _localdata_file = "" 36var _localdata_file = ""
37var _death_link = false 37var _death_link = false
38var _victory_condition = 0 # THE END, THE MASTER
38 39
39var _map_loaded = false 40var _map_loaded = false
40var _held_items = [] 41var _held_items = []
@@ -151,6 +152,9 @@ func _on_data():
151 if _death_link: 152 if _death_link:
152 sendConnectUpdate(["DeathLink"]) 153 sendConnectUpdate(["DeathLink"])
153 154
155 if _slot_data.has("victory_condition"):
156 _victory_condition = _slot_data["victory_condition"]
157
154 _localdata_file = "user://archipelago/%s_%d" % [_seed, _slot] 158 _localdata_file = "user://archipelago/%s_%d" % [_seed, _slot]
155 var ap_file = File.new() 159 var ap_file = File.new()
156 if ap_file.file_exists(_localdata_file): 160 if ap_file.file_exists(_localdata_file):
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index ca1269b..7b7e648 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -38,11 +38,17 @@ func _load():
38 "answer_correct", location, "handle_correct" 38 "answer_correct", location, "handle_correct"
39 ) 39 )
40 40
41 # Hardcode THE END as the goal for now. 41 # Hook up the goal panel.
42 var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") 42 if apclient._victory_condition == 1:
43 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( 43 var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master")
44 "answer_correct", apclient, "completedGoal" 44 the_master.get_node("Viewport/GUI/Panel/TextEdit").connect(
45 ) 45 "answer_correct", apclient, "completedGoal"
46 )
47 else:
48 var the_end = self.get_node("Decorations/EndPanel/Panel_end_end")
49 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect(
50 "answer_correct", apclient, "completedGoal"
51 )
46 52
47 # Create the messages node. 53 # Create the messages node.
48 var messages_script = ResourceLoader.load("user://maps/Archipelago/messages.gd") 54 var messages_script = ResourceLoader.load("user://maps/Archipelago/messages.gd")
16' href='#n516'>516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595