From 36eee0423e7f29e352c9c44d0ebb592007ec7436 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 16 Apr 2023 01:07:53 -0400 Subject: Added support for THE MASTER as the goal --- Archipelago/client.gd | 4 ++++ Archipelago/load.gd | 16 +++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'Archipelago') 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 = [] var _panel_ids_by_location = {} var _localdata_file = "" var _death_link = false +var _victory_condition = 0 # THE END, THE MASTER var _map_loaded = false var _held_items = [] @@ -151,6 +152,9 @@ func _on_data(): if _death_link: sendConnectUpdate(["DeathLink"]) + if _slot_data.has("victory_condition"): + _victory_condition = _slot_data["victory_condition"] + _localdata_file = "user://archipelago/%s_%d" % [_seed, _slot] var ap_file = File.new() 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(): "answer_correct", location, "handle_correct" ) - # Hardcode THE END as the goal for now. - var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") - the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( - "answer_correct", apclient, "completedGoal" - ) + # Hook up the goal panel. + if apclient._victory_condition == 1: + var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") + the_master.get_node("Viewport/GUI/Panel/TextEdit").connect( + "answer_correct", apclient, "completedGoal" + ) + else: + var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") + the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( + "answer_correct", apclient, "completedGoal" + ) # Create the messages node. var messages_script = ResourceLoader.load("user://maps/Archipelago/messages.gd") -- cgit 1.4.1