extends "res://scripts/load.gd" func _load(): global._print("Hooked Load Start") var apclient = global.get_node("Archipelago") # Override the YOU panel with the AP slot name. if self.get_node_or_null("Panels/Color Arrow Room/Panel_you") != null: self.get_node("Panels/Color Arrow Room/Panel_you").answer = apclient.ap_user for node in get_tree().get_nodes_in_group("text_you"): if "text" in node: node.text = apclient.ap_user elif "value" in node: node.value = apclient.ap_user for node in get_tree().get_nodes_in_group("answer_you"): if "answer" in node: node.answer = apclient.ap_user # This is the best time to create the location nodes, since the map is now # loaded but the panels haven't been solved from the save file yet. var panels_parent = self.get_node("Panels") var location_script = ResourceLoader.load("user://maps/Archipelago/location.gd") for location_id in apclient._panel_ids_by_location.keys(): var location = location_script.new() location.ap_id = int(location_id) location.name = "AP_location_" + location.ap_id self.add_child(location) var panels = apclient._panel_ids_by_location[String(location.ap_id)] location.total = panels.size() for panel in panels: var that_panel if panel.begins_with("EndPanel"): that_panel = self.get_node("Decorations").get_node(panel) else: that_panel = panels_parent.get_node(panel) that_panel.get_node("Viewport/GUI/Panel/TextEdit").connect( "answer_correct", location, "handle_correct" ) # Randomize the panels, if necessary. var rng = RandomNumberGenerator.new() rng.seed = apclient._slot_seed var gamedata = apclient.get_node("Gamedata") if apclient._panel_shuffle == apclient.kREARRANGE_PANELS: # Do the actual shuffling. var panel_pools = {} for panel in gamedata.panels: if not panel_pools.has(panel["tag"]): panel_pools[panel["tag"]] = {} var pool = panel_pools[panel["tag"]] var subtag = "default" if panel.has("subtag"): subtag = panel["subtag"] if not pool.has(subtag): pool[subtag] = [] var panel_node = panels_parent.get_node(panel["id"]) pool[subtag].append( { "id": panel["id"], "hint": panel_node.text, "answer": panel_node.answer, "link": panel["link"], "copy_to_sign": panel["copy_to_sign"] } ) for tag in panel_pools.keys(): if tag == "forbid": continue var pool = panel_pools[tag] for subtag in pool.keys(): pool[subtag].sort_custom(self, "sort_by_link") var count = pool[pool.keys()[0]].size() var iota = range(0, count) var order = [] while not iota.empty(): var i = rng.randi_range(0, iota.size() - 1) order.append(iota[i]) iota.remove(i) for subtag in pool.keys(): for i in range(0, count): var source = pool[subtag][i] var target = pool[subtag][order[i]] var target_panel_node = panels_parent.get_node(target["id"]) target_panel_node.text = source["hint"] target_panel_node.answer = source["answer"] for sign_name in target["copy_to_sign"]: self.get_node("Decorations/PanelSign").get_node(sign_name).value = source["hint"] # Change the answer to the final puzzle in the art gallery based on the # puzzles that were shuffled into the constituent places. var new_answer = panels_parent.get_node("Painting Room/Panel_eon_one").answer new_answer += " " new_answer += panels_parent.get_node("Painting Room/Panel_path_road").answer new_answer += " " new_answer += panels_parent.get_node("Painting Room/Panel_any_many").answer new_answer += " " new_answer += panels_parent.get_node("Painting Room/Panel_send_use_turns").answer panels_parent.get_node("Painting Room/Panel_order_onepathmanyturns").answer = new_answer # Handle our other static panels after panel randomization, so that the old # values can enter the pool, if necessary. set_static_panel("Entry Room/Panel_hi_hi", "hi") set_static_panel("Entry Room/Panel_write_write", apclient.my_version) set_static_panel("Entry Room/Panel_same_same", str(apclient._slot_seed)) set_static_panel("Entry Room/Panel_type_type", "victory") var victory_condition = "unknown" if apclient._vict
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Cartographic.xcodeproj">
</FileRef>
</Workspace>