summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-01-06 14:12:46 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-01-06 14:12:46 -0500
commit335fe2a98620ba9d01e3dacb461596a16b475b89 (patch)
tree7f6cbee99dbf97a3fa55b97be0856f507073be94
parent73d11b69770e5ca322ccbb69834a18ebdfbfec8d (diff)
downloadlingo-randomizer-335fe2a98620ba9d01e3dacb461596a16b475b89.tar.gz
lingo-randomizer-335fe2a98620ba9d01e3dacb461596a16b475b89.tar.bz2
lingo-randomizer-335fe2a98620ba9d01e3dacb461596a16b475b89.zip
Transform pilgrim room
-rw-r--r--randomizer/load.gd103
1 files changed, 103 insertions, 0 deletions
diff --git a/randomizer/load.gd b/randomizer/load.gd index c14332c..aad221f 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd
@@ -123,6 +123,88 @@ func _load():
123 proxynode.exact_proxy = true 123 proxynode.exact_proxy = true
124 proxynode.request_ready() 124 proxynode.request_ready()
125 oldparent.add_child(proxynode) 125 oldparent.add_child(proxynode)
126
127 # Transform the Pilgrim Room.
128 transform_panel("Lingo Room/Panel_lingo_1", 3, 2, 25.001, 0, 0, 0, 2, 2, 1)
129 transform_panel("Lingo Room/Panel_lingo_8", 6.999, 1, 27, 0, -90, 0, 2, 2, 1)
130 transform_panel("Lingo Room/Panel_lingo_3", 10, 1, 75.999, 0, 180, 0, 2, 2, 1)
131 transform_panel("Lingo Room/Panel_lingo_2", -11, 1, 68.999, 0, 180, 0, 2, 2, 1)
132 transform_panel("Lingo Room/Panel_lingo_5", -24.999, 1, 63, 0, 90, 0, 2, 2, 1)
133 transform_panel("Lingo Room/Panel_lingo_11", -25.999, 2, 45, 0, 90, 0, 2, 2, 1)
134
135 clear_gridmap_tile(2.5, 2.5, 23.5)
136 set_gridmap_tile(2.5, 1.5, 23.5, "MeshInstance18")
137 set_gridmap_tile(3.5, 1.5, 23.5, "MeshInstance18")
138 set_gridmap_tile(2.5, 2.5, 24.5, "MeshInstance8")
139 set_gridmap_tile(2.5, 1.5, 24.5, "MeshInstance8")
140 set_gridmap_tile(3.5, 2.5, 24.5, "MeshInstance8")
141 set_gridmap_tile(3.5, 1.5, 24.5, "MeshInstance8")
142
143 set_gridmap_tile(8.5, 1.5, 27.5, "MeshInstance18")
144 set_gridmap_tile(8.5, 0.5, 26.5, "MeshInstance18")
145 set_gridmap_tile(7.5, 1.5, 27.5, "MeshInstance6")
146 set_gridmap_tile(7.5, 1.5, 26.5, "MeshInstance6")
147 set_gridmap_tile(7.5, 0.5, 27.5, "MeshInstance6")
148 set_gridmap_tile(7.5, 0.5, 26.5, "MeshInstance6")
149
150 set_gridmap_tile(9.5, 0.5, 76.5, "MeshInstance5")
151 set_gridmap_tile(9.5, 1.5, 76.5, "MeshInstance5")
152 set_gridmap_tile(10.5, 1.5, 76.5, "MeshInstance5")
153 set_gridmap_tile(10.5, 1.5, 77.5, "MeshInstance18")
154 set_gridmap_tile(9.5, 1.5, 77.5, "MeshInstance18")
155
156 set_gridmap_tile(-10.5, 0.5, 69.5, "MeshInstance4")
157 set_gridmap_tile(-10.5, 1.5, 69.5, "MeshInstance4")
158 set_gridmap_tile(-11.5, 0.5, 69.5, "MeshInstance9")
159 set_gridmap_tile(-11.5, 1.5, 69.5, "MeshInstance9")
160 set_gridmap_tile(-10.5, 0.5, 70.5, "MeshInstance18")
161 set_gridmap_tile(-11.5, 0.5, 70.5, "MeshInstance18")
162
163 clear_gridmap_tile(-26.5, 1.5, 64.5)
164 set_gridmap_tile(-26.5, 1.5, 63.5, "MeshInstance18")
165 clear_gridmap_tile(-26.5, 1.5, 62.5)
166 clear_gridmap_tile(-26.5, 1.5, 61.5)
167 set_gridmap_tile(-26.5, 0.5, 62.5, "MeshInstance18")
168 set_gridmap_tile(-25.5, 1.5, 63.5, "MeshInstance6")
169 set_gridmap_tile(-25.5, 0.5, 63.5, "MeshInstance6")
170 set_gridmap_tile(-25.5, 1.5, 62.5, "MeshInstance4")
171 set_gridmap_tile(-25.5, 0.5, 62.5, "MeshInstance4")
172
173 set_gridmap_tile(-26.5, 1.5, 45.5, "MeshInstance9")
174 set_gridmap_tile(-26.5, 2.5, 45.5, "MeshInstance9")
175 set_gridmap_tile(-26.5, 2.5, 44.5, "MeshInstance9")
176 set_gridmap_tile(-27.5, 1.5, 45.5, "MeshInstance18")
177 set_gridmap_tile(-27.5, 2.5, 44.5, "MeshInstance18")
178
179 var cdp_template = load("res://nodes/panel_countdown.tscn")
180 var pilgrim_cdp = cdp_template.instance()
181 var pilgrim_real = panels_parent.get_node("Lingo Room/Panel_lingo_9")
182 pilgrim_real.text = "you"
183 pilgrim_real.answer = "the pilgrim"
184 pilgrim_real.achieved_text = "the pilgrim"
185 pilgrim_cdp.translation = pilgrim_real.translation
186 pilgrim_cdp.rotation = pilgrim_real.rotation
187 pilgrim_cdp.scale = pilgrim_real.scale
188 pilgrim_cdp.replace_with = "../../Panels/Countdown Panels/Panel_lingo_9"
189 pilgrim_cdp.panels = [
190 "../../Panels/Lingo Room/Panel_lingo_1",
191 "../../Panels/Lingo Room/Panel_lingo_2",
192 "../../Panels/Lingo Room/Panel_lingo_3",
193 "../../Panels/Lingo Room/Panel_lingo_4",
194 "../../Panels/Lingo Room/Panel_lingo_5",
195 "../../Panels/Lingo Room/Panel_lingo_6",
196 "../../Panels/Lingo Room/Panel_lingo_7",
197 "../../Panels/Lingo Room/Panel_lingo_8",
198 "../../Panels/Lingo Room/Panel_lingo_10",
199 "../../Panels/Lingo Room/Panel_lingo_11",
200 "../../Panels/Lingo Room/Panel_lingo_12",
201 "../../Panels/Lingo Room/Panel_lingo_13"
202 ]
203 pilgrim_real.get_parent().remove_child(pilgrim_real)
204 panels_parent.get_node("Countdown Panels").add_child(pilgrim_real)
205 pilgrim_cdp.set_name("CountdownPanel_pilgrim")
206 $CountdownPanels.add_child(pilgrim_cdp)
207 pilgrim_real.translation.y = -33
126 208
127 # Proceed with the rest of the load. 209 # Proceed with the rest of the load.
128 global._print("Hooked Load End") 210 global._print("Hooked Load End")
@@ -145,3 +227,24 @@ func set_gridmap_tile(x, y, z, tile):
145 var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) 227 var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z)))
146 228
147 gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) 229 gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile))
230
231
232func clear_gridmap_tile(x, y, z):
233 var gridmap = self.get_node("GridMap")
234 var mesh_library = gridmap.mesh_library
235 var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z)))
236
237 gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, GridMap.INVALID_CELL_ITEM)
238
239
240func transform_panel(path, tx, ty, tz, rx, ry, rz, sx, sy, sz):
241 var panel_node = self.get_node("Panels").get_node(path)
242 panel_node.translation.x = tx
243 panel_node.translation.y = ty
244 panel_node.translation.z = tz
245 panel_node.rotation_degrees.x = rx
246 panel_node.rotation_degrees.y = ry
247 panel_node.rotation_degrees.z = rz
248 panel_node.scale.x = sx
249 panel_node.scale.y = sy
250 panel_node.scale.z = sz