about summary refs log tree commit diff stats
path: root/Archipelago/load.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-14 11:32:40 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-14 11:32:40 -0400
commitdeab7140f9415f0f5fea9240a291b976e507593f (patch)
tree1ce784f6b89bd6560fff3367a9ffe3891e6edfe8 /Archipelago/load.gd
parentce9cc1c0ef41d342802798cad51d6dbe6ae49fe4 (diff)
downloadlingo-archipelago-deab7140f9415f0f5fea9240a291b976e507593f.tar.gz
lingo-archipelago-deab7140f9415f0f5fea9240a291b976e507593f.tar.bz2
lingo-archipelago-deab7140f9415f0f5fea9240a291b976e507593f.zip
Created rudimentary message display
It shows when the player sends a location or receives an item. Currently it just shows IDs instead of names. We need to download all data packages so that we can read the names. We are also currently queueing a message when we send a location, which isn't the best because if that location turns out to contain an item for us, we'll get two messages. It would be better to hold off until we receive a PrintJSON message describing the location that was sent out.

We also now cache the ID of the most recently processed item, so that on relaunch we know which items are new and should be announced.
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r--Archipelago/load.gd16
1 files changed, 11 insertions, 5 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index d17bfac..ca1269b 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 # Hardcode THE END as the goal for now.
42 var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") 42 var the_end = self.get_node("Decorations/EndPanel/Panel_end_end")
43 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( 43 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect(
44 "answer_correct", apclient, "completedGoal" 44 "answer_correct", apclient, "completedGoal"
45 ) 45 )
46
47 # Create the messages node.
48 var messages_script = ResourceLoader.load("user://maps/Archipelago/messages.gd")
49 var messages = messages_script.new()
50 messages.set_name("AP_Messages")
51 self.add_child(messages)
46 52
47 # Proceed with the rest of the load. 53 # Proceed with the rest of the load.
48 global._print("Hooked Load End") 54 global._print("Hooked Load End")