diff options
| -rw-r--r-- | Archipelago/load.gd | 24 |
1 files changed, 23 insertions, 1 deletions
| diff --git a/Archipelago/load.gd b/Archipelago/load.gd index a277817..66c9b8a 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
| @@ -437,6 +437,26 @@ func _load(): | |||
| 437 | 437 | ||
| 438 | var chosen_painting = remaining[rng.randi_range(0, remaining.size() - 1)] | 438 | var chosen_painting = remaining[rng.randi_range(0, remaining.size() - 1)] |
| 439 | instantiate_painting(painting, chosen_painting) | 439 | instantiate_painting(painting, chosen_painting) |
| 440 | |||
| 441 | # Replace the roof of The Artistic. | ||
| 442 | var artistic_paintings = [ | ||
| 443 | ["smile_painting_9", -49.5, 44.5], | ||
| 444 | ["cherry_painting3", -38.5, 44.5], | ||
| 445 | ["boxes_painting2", -38.5, 55.5], | ||
| 446 | ["panda_painting_3", -49.5, 55.5] | ||
| 447 | ] | ||
| 448 | for painting in artistic_paintings: | ||
| 449 | var painting_node = get_node("AP_Paintings").get_node(painting[0]).get_node("GridMap") | ||
| 450 | var small_mesh_library = painting_node.mesh_library | ||
| 451 | |||
| 452 | for x in range(0,10): | ||
| 453 | for y in range(0,10): | ||
| 454 | var cellitem = painting_node.get_cell_item(-5 + x, 1+y, 0) | ||
| 455 | var meshitem = small_mesh_library.get_item_name(cellitem) | ||
| 456 | if meshitem.begins_with("Tiny"): | ||
| 457 | meshitem = meshitem.substr(4) | ||
| 458 | set_gridmap_tile(painting[1]+9-y, 8.5, painting[2]+x, meshitem) | ||
| 459 | |||
| 440 | 460 | ||
| 441 | # We need to make some changes to the Art Gallery. The player should always | 461 | # We need to make some changes to the Art Gallery. The player should always |
| 442 | # have access to the backroom, but they shouldn't have access to ORDER until | 462 | # have access to the backroom, but they shouldn't have access to ORDER until |
| @@ -640,8 +660,10 @@ func set_gridmap_tile(x, y, z, tile): | |||
| 640 | var gridmap = self.get_node("GridMap") | 660 | var gridmap = self.get_node("GridMap") |
| 641 | var mesh_library = gridmap.mesh_library | 661 | var mesh_library = gridmap.mesh_library |
| 642 | var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) | 662 | var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) |
| 663 | var cellitem = mesh_library.find_item_by_name(tile) | ||
| 643 | 664 | ||
| 644 | gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) | 665 | if cellitem != GridMap.INVALID_CELL_ITEM: |
| 666 | gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, cellitem) | ||
| 645 | 667 | ||
| 646 | 668 | ||
| 647 | func clear_gridmap_tile(x, y, z): | 669 | func clear_gridmap_tile(x, y, z): |
