about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-12-08 16:14:53 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-12-08 16:14:53 -0500
commit84f4fc2db8b7ada36faa5341cb7bee17750f1a07 (patch)
treee2f05a7dd4e7fe5aa54ea304f8b8de9f5664ba3c /Archipelago
parent4b53c8858448e4fc835c907813632f6eeddd543d (diff)
downloadlingo-archipelago-84f4fc2db8b7ada36faa5341cb7bee17750f1a07.tar.gz
lingo-archipelago-84f4fc2db8b7ada36faa5341cb7bee17750f1a07.tar.bz2
lingo-archipelago-84f4fc2db8b7ada36faa5341cb7bee17750f1a07.zip
Add workaround for 0.5.1 number hunt logic bug
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd16
-rw-r--r--Archipelago/extradata.gd84
-rw-r--r--Archipelago/load.gd14
3 files changed, 113 insertions, 1 deletions
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):
779 doorsNode.get_node(door_id).openDoor() 779 doorsNode.get_node(door_id).openDoor()
780 780
781 if gamedata.panel_ids_by_item_id.has(int(item)): 781 if gamedata.panel_ids_by_item_id.has(int(item)):
782 var panel_ids = gamedata.panel_ids_by_item_id[int(item)]
783 if wasGeneratedOnVersion(0, 5, 1):
784 var extradata = get_node("Extradata")
785 if extradata.panels_mode_051_panel_fixes.has(int(item)):
786 panel_ids = extradata.panels_mode_051_panel_fixes[int(item)]
787
782 var panelsNode = get_tree().get_root().get_node("Spatial/Panels") 788 var panelsNode = get_tree().get_root().get_node("Spatial/Panels")
783 for panel_id in gamedata.panel_ids_by_item_id[int(item)]: 789 for panel_id in panel_ids:
784 panelsNode.get_node(panel_id).get_node("AP_Panel").locked = false 790 panelsNode.get_node(panel_id).get_node("AP_Panel").locked = false
785 emit_signal("evaluate_solvability") 791 emit_signal("evaluate_solvability")
786 792
@@ -990,3 +996,11 @@ func compareVersion(lhs, rhs):
990 996
991func wasGeneratedBeforeVersion(major, minor, build): 997func wasGeneratedBeforeVersion(major, minor, build):
992 return compareVersion(_gen_version, {"major": major, "minor": minor, "build": build}) 998 return compareVersion(_gen_version, {"major": major, "minor": minor, "build": build})
999
1000
1001func wasGeneratedOnVersion(major, minor, build):
1002 return (
1003 _gen_version["major"] == major
1004 and _gen_version["minor"] == minor
1005 and _gen_version["build"] == build
1006 )
diff --git a/Archipelago/extradata.gd b/Archipelago/extradata.gd index 89c41d2..2e26eb2 100644 --- a/Archipelago/extradata.gd +++ b/Archipelago/extradata.gd
@@ -93,3 +93,87 @@ var proxies = {
93 "Open Areas/Panel_rise_horizon": ["Open Areas/Panel_son_horizon"], 93 "Open Areas/Panel_rise_horizon": ["Open Areas/Panel_son_horizon"],
94 "Open Areas/Panel_son_sunrise": ["Open Areas/Panel_rise_sunrise"] 94 "Open Areas/Panel_son_sunrise": ["Open Areas/Panel_rise_sunrise"]
95} 95}
96
97var panels_mode_051_panel_fixes = {
98 444647:
99 [
100 "Backside Room/Panel_three_three",
101 "Backside Room/Panel_three_three_2",
102 "Backside Room/Panel_three_three_3",
103 "Backside Room/Panel_four_four_3",
104 "Backside Room/Panel_four_four_2",
105 "Backside Room/Panel_four_four_4"
106 ],
107 444648:
108 [
109 "Backside Room/Panel_four_four",
110 "Backside Room/Panel_five_five_5",
111 "Backside Room/Panel_five_five_4"
112 ],
113 444649:
114 [
115 "Backside Room/Panel_five_five",
116 "Backside Room/Panel_five_five_3",
117 "Backside Room/Panel_five_five_2",
118 "Backside Room/Panel_six_six_4"
119 ],
120 444650:
121 [
122 "Backside Room/Panel_six_six",
123 "Backside Room/Panel_six_six_3",
124 "Backside Room/Panel_six_six_2",
125 "Backside Room/Panel_six_six_5",
126 "Backside Room/Panel_six_six_6",
127 "Backside Room/Panel_seven_seven_5",
128 "Backside Room/Panel_seven_seven_6"
129 ],
130 444651:
131 [
132 "Backside Room/Panel_seven_seven",
133 "Backside Room/Panel_seven_seven_2",
134 "Backside Room/Panel_seven_seven_7",
135 "Backside Room/Panel_seven_seven_3",
136 "Backside Room/Panel_seven_seven_4",
137 "Backside Room/Panel_eight_eight_8",
138 "Backside Room/Panel_eight_eight_5",
139 "Backside Room/Panel_eight_eight_3",
140 "Backside Room/Panel_eight_eight_7"
141 ],
142 444652:
143 [
144 "Backside Room/Panel_eight_eight",
145 "Backside Room/Panel_eight_eight_2",
146 "Backside Room/Panel_eight_eight_4",
147 "Backside Room/Panel_eight_eight_6",
148 "Backside Room/Panel_nine_nine_3",
149 "Backside Room/Panel_nine_nine_8",
150 "Backside Room/Panel_nine_nine_4",
151 "Backside Room/Panel_nine_nine_5",
152 "Backside Room/Panel_nine_nine_2"
153 ],
154 444653:
155 [
156 "Backside Room/Panel_nine_nine",
157 "Backside Room/Panel_nine_nine_6",
158 "Backside Room/Panel_nine_nine_8",
159 "Backside Room/Panel_nine_nine_9",
160 "Backside Room/Panel_nine_nine_7"
161 ]
162}
163
164var panels_mode_051_door_fixes = {
165 "Door_four_hider": ["Door_four_hider_3", "Door_four_hider_4", "Door_four_hider_2"],
166 "Door_five_hider": ["Door_five_hider_4", "Door_five_hider_5"],
167 "Door_six_hider": ["Door_six_hider_4"],
168 "Door_seven_hider": ["Door_seven_hider_6", "Door_seven_hider_5"],
169 "Door_eight_hider":
170 ["Door_eight_hider_7", "Door_eight_hider_8", "Door_eight_hider_3", "Door_eight_hider_5"],
171 "Door_nine_hider":
172 [
173 "Door_nine_hider_3",
174 "Door_nine_hider_8",
175 "Door_nine_hider_4",
176 "Door_nine_hider_5",
177 "Door_nine_hider_2"
178 ]
179}
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 4811b47..e593548 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -551,6 +551,20 @@ func _load():
551 proxynode.exact_proxy = true 551 proxynode.exact_proxy = true
552 proxynode.request_ready() 552 proxynode.request_ready()
553 oldparent.add_child(proxynode) 553 oldparent.add_child(proxynode)
554
555 # If the world was generated on 0.5.1, apply the hotfix for the number hunt doors.
556 if apclient.wasGeneratedOnVersion(0, 5, 1):
557 var number_hunt_parent = get_node("Doors/Count Up Room Area Doors")
558 var extradata_051_fix = apclient.get_node("Extradata").panels_mode_051_door_fixes
559 for template_door_path in extradata_051_fix:
560 var template_door = number_hunt_parent.get_node(template_door_path)
561 var impacted_doors = extradata_051_fix[template_door_path]
562 for impacted_door_path in impacted_doors:
563 var impacted_door = number_hunt_parent.get_node(impacted_door_path)
564 var copied_door = impacted_door.duplicate()
565 copied_door.panels = template_door.panels
566 number_hunt_parent.add_child(copied_door)
567 impacted_door.queue_free()
554 568
555 # Attach a script to every panel so that we can do things like conditionally 569 # Attach a script to every panel so that we can do things like conditionally
556 # disable them. 570 # disable them.