From ce9cc1c0ef41d342802798cad51d6dbe6ae49fe4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 14 Apr 2023 08:55:43 -0400 Subject: Getting THE END marks you as completed --- Archipelago/client.gd | 4 ++++ Archipelago/load.gd | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 4e3ca75..e8f9bba 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -233,6 +233,10 @@ func sendLocation(loc_id): _held_locations.append(loc_id) +func completedGoal(): + sendMessage([{"cmd": "StatusUpdate", "status": 30}]) # CLIENT_GOAL + + func mapFinishedLoading(): if !_map_loaded: for item in _held_items: diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 6d6fcf0..d17bfac 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -38,6 +38,12 @@ 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" + ) + # Proceed with the rest of the load. global._print("Hooked Load End") ._load() -- cgit 1.4.1