From 335fe2a98620ba9d01e3dacb461596a16b475b89 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 6 Jan 2024 14:12:46 -0500 Subject: Transform pilgrim room --- randomizer/load.gd | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) (limited to 'randomizer') 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(): proxynode.exact_proxy = true proxynode.request_ready() oldparent.add_child(proxynode) + + # Transform the Pilgrim Room. + transform_panel("Lingo Room/Panel_lingo_1", 3, 2, 25.001, 0, 0, 0, 2, 2, 1) + transform_panel("Lingo Room/Panel_lingo_8", 6.999, 1, 27, 0, -90, 0, 2, 2, 1) + transform_panel("Lingo Room/Panel_lingo_3", 10, 1, 75.999, 0, 180, 0, 2, 2, 1) + transform_panel("Lingo Room/Panel_lingo_2", -11, 1, 68.999, 0, 180, 0, 2, 2, 1) + transform_panel("Lingo Room/Panel_lingo_5", -24.999, 1, 63, 0, 90, 0, 2, 2, 1) + transform_panel("Lingo Room/Panel_lingo_11", -25.999, 2, 45, 0, 90, 0, 2, 2, 1) + + clear_gridmap_tile(2.5, 2.5, 23.5) + set_gridmap_tile(2.5, 1.5, 23.5, "MeshInstance18") + set_gridmap_tile(3.5, 1.5, 23.5, "MeshInstance18") + set_gridmap_tile(2.5, 2.5, 24.5, "MeshInstance8") + set_gridmap_tile(2.5, 1.5, 24.5, "MeshInstance8") + set_gridmap_tile(3.5, 2.5, 24.5, "MeshInstance8") + set_gridmap_tile(3.5, 1.5, 24.5, "MeshInstance8") + + set_gridmap_tile(8.5, 1.5, 27.5, "MeshInstance18") + set_gridmap_tile(8.5, 0.5, 26.5, "MeshInstance18") + set_gridmap_tile(7.5, 1.5, 27.5, "MeshInstance6") + set_gridmap_tile(7.5, 1.5, 26.5, "MeshInstance6") + set_gridmap_tile(7.5, 0.5, 27.5, "MeshInstance6") + set_gridmap_tile(7.5, 0.5, 26.5, "MeshInstance6") + + set_gridmap_tile(9.5, 0.5, 76.5, "MeshInstance5") + set_gridmap_tile(9.5, 1.5, 76.5, "MeshInstance5") + set_gridmap_tile(10.5, 1.5, 76.5, "MeshInstance5") + set_gridmap_tile(10.5, 1.5, 77.5, "MeshInstance18") + set_gridmap_tile(9.5, 1.5, 77.5, "MeshInstance18") + + set_gridmap_tile(-10.5, 0.5, 69.5, "MeshInstance4") + set_gridmap_tile(-10.5, 1.5, 69.5, "MeshInstance4") + set_gridmap_tile(-11.5, 0.5, 69.5, "MeshInstance9") + set_gridmap_tile(-11.5, 1.5, 69.5, "MeshInstance9") + set_gridmap_tile(-10.5, 0.5, 70.5, "MeshInstance18") + set_gridmap_tile(-11.5, 0.5, 70.5, "MeshInstance18") + + clear_gridmap_tile(-26.5, 1.5, 64.5) + set_gridmap_tile(-26.5, 1.5, 63.5, "MeshInstance18") + clear_gridmap_tile(-26.5, 1.5, 62.5) + clear_gridmap_tile(-26.5, 1.5, 61.5) + set_gridmap_tile(-26.5, 0.5, 62.5, "MeshInstance18") + set_gridmap_tile(-25.5, 1.5, 63.5, "MeshInstance6") + set_gridmap_tile(-25.5, 0.5, 63.5, "MeshInstance6") + set_gridmap_tile(-25.5, 1.5, 62.5, "MeshInstance4") + set_gridmap_tile(-25.5, 0.5, 62.5, "MeshInstance4") + + set_gridmap_tile(-26.5, 1.5, 45.5, "MeshInstance9") + set_gridmap_tile(-26.5, 2.5, 45.5, "MeshInstance9") + set_gridmap_tile(-26.5, 2.5, 44.5, "MeshInstance9") + set_gridmap_tile(-27.5, 1.5, 45.5, "MeshInstance18") + set_gridmap_tile(-27.5, 2.5, 44.5, "MeshInstance18") + + var cdp_template = load("res://nodes/panel_countdown.tscn") + var pilgrim_cdp = cdp_template.instance() + var pilgrim_real = panels_parent.get_node("Lingo Room/Panel_lingo_9") + pilgrim_real.text = "you" + pilgrim_real.answer = "the pilgrim" + pilgrim_real.achieved_text = "the pilgrim" + pilgrim_cdp.translation = pilgrim_real.translation + pilgrim_cdp.rotation = pilgrim_real.rotation + pilgrim_cdp.scale = pilgrim_real.scale + pilgrim_cdp.replace_with = "../../Panels/Countdown Panels/Panel_lingo_9" + pilgrim_cdp.panels = [ + "../../Panels/Lingo Room/Panel_lingo_1", + "../../Panels/Lingo Room/Panel_lingo_2", + "../../Panels/Lingo Room/Panel_lingo_3", + "../../Panels/Lingo Room/Panel_lingo_4", + "../../Panels/Lingo Room/Panel_lingo_5", + "../../Panels/Lingo Room/Panel_lingo_6", + "../../Panels/Lingo Room/Panel_lingo_7", + "../../Panels/Lingo Room/Panel_lingo_8", + "../../Panels/Lingo Room/Panel_lingo_10", + "../../Panels/Lingo Room/Panel_lingo_11", + "../../Panels/Lingo Room/Panel_lingo_12", + "../../Panels/Lingo Room/Panel_lingo_13" + ] + pilgrim_real.get_parent().remove_child(pilgrim_real) + panels_parent.get_node("Countdown Panels").add_child(pilgrim_real) + pilgrim_cdp.set_name("CountdownPanel_pilgrim") + $CountdownPanels.add_child(pilgrim_cdp) + pilgrim_real.translation.y = -33 # Proceed with the rest of the load. global._print("Hooked Load End") @@ -145,3 +227,24 @@ func set_gridmap_tile(x, y, z, tile): var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) + + +func clear_gridmap_tile(x, y, z): + var gridmap = self.get_node("GridMap") + var mesh_library = gridmap.mesh_library + var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) + + gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, GridMap.INVALID_CELL_ITEM) + + +func transform_panel(path, tx, ty, tz, rx, ry, rz, sx, sy, sz): + var panel_node = self.get_node("Panels").get_node(path) + panel_node.translation.x = tx + panel_node.translation.y = ty + panel_node.translation.z = tz + panel_node.rotation_degrees.x = rx + panel_node.rotation_degrees.y = ry + panel_node.rotation_degrees.z = rz + panel_node.scale.x = sx + panel_node.scale.y = sy + panel_node.scale.z = sz -- cgit 1.4.1