From 84f4fc2db8b7ada36faa5341cb7bee17750f1a07 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 8 Dec 2024 16:14:53 -0500 Subject: Add workaround for 0.5.1 number hunt logic bug --- Archipelago/client.gd | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Archipelago/client.gd') diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 8f9d3e0..99be37a 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -779,8 +779,14 @@ func processItem(item, index, from, flags): doorsNode.get_node(door_id).openDoor() if gamedata.panel_ids_by_item_id.has(int(item)): + var panel_ids = gamedata.panel_ids_by_item_id[int(item)] + if wasGeneratedOnVersion(0, 5, 1): + var extradata = get_node("Extradata") + if extradata.panels_mode_051_panel_fixes.has(int(item)): + panel_ids = extradata.panels_mode_051_panel_fixes[int(item)] + var panelsNode = get_tree().get_root().get_node("Spatial/Panels") - for panel_id in gamedata.panel_ids_by_item_id[int(item)]: + for panel_id in panel_ids: panelsNode.get_node(panel_id).get_node("AP_Panel").locked = false emit_signal("evaluate_solvability") @@ -990,3 +996,11 @@ func compareVersion(lhs, rhs): func wasGeneratedBeforeVersion(major, minor, build): return compareVersion(_gen_version, {"major": major, "minor": minor, "build": build}) + + +func wasGeneratedOnVersion(major, minor, build): + return ( + _gen_version["major"] == major + and _gen_version["minor"] == minor + and _gen_version["build"] == build + ) -- cgit 1.4.1