diff options
Diffstat (limited to 'Archipelago')
| -rw-r--r-- | Archipelago/client.gd | 46 | ||||
| -rw-r--r-- | Archipelago/load.gd | 87 | ||||
| -rw-r--r-- | Archipelago/mypainting.gd | 5 | ||||
| -rw-r--r-- | Archipelago/painting.gd | 10 | ||||
| -rw-r--r-- | Archipelago/painting_eye.gd | 16 | ||||
| -rw-r--r-- | Archipelago/painting_scenery.gd | 10 | ||||
| -rw-r--r-- | Archipelago/panel.gd | 4 | ||||
| -rw-r--r-- | Archipelago/pilgrimage_terminator.gd | 11 | ||||
| -rw-r--r-- | Archipelago/settings_screen.gd | 5 | ||||
| -rw-r--r-- | Archipelago/teleport.gd | 27 |
10 files changed, 215 insertions, 6 deletions
| diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 58a099c..4431fa0 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
| @@ -7,6 +7,7 @@ var SCRIPT_multiplayer | |||
| 7 | var SCRIPT_mypainting | 7 | var SCRIPT_mypainting |
| 8 | var SCRIPT_notifier | 8 | var SCRIPT_notifier |
| 9 | var SCRIPT_panel | 9 | var SCRIPT_panel |
| 10 | var SCRIPT_pilgrimage_terminator | ||
| 10 | var SCRIPT_uuid | 11 | var SCRIPT_uuid |
| 11 | 12 | ||
| 12 | var ap_server = "" | 13 | var ap_server = "" |
| @@ -40,7 +41,7 @@ const progressive_items = { | |||
| 40 | ], | 41 | ], |
| 41 | "Progressive Hallway Room": | 42 | "Progressive Hallway Room": |
| 42 | [ | 43 | [ |
| 43 | {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"}, | 44 | {"item": "Hallway Room (1) - Exit", "display": "First Door"}, |
| 44 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, | 45 | {"item": "Hallway Room (2) - Exit", "display": "Second Door"}, |
| 45 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, | 46 | {"item": "Hallway Room (3) - Exit", "display": "Third Door"}, |
| 46 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, | 47 | {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, |
| @@ -62,12 +63,22 @@ const progressive_items = { | |||
| 62 | {"item": "The Colorful - Green Door", "display": "Green"}, | 63 | {"item": "The Colorful - Green Door", "display": "Green"}, |
| 63 | {"item": "The Colorful - Brown Door", "display": "Brown"}, | 64 | {"item": "The Colorful - Brown Door", "display": "Brown"}, |
| 64 | {"item": "The Colorful - Gray Door", "display": "Gray"}, | 65 | {"item": "The Colorful - Gray Door", "display": "Gray"}, |
| 66 | ], | ||
| 67 | "Progressive Pilgrimage": | ||
| 68 | [ | ||
| 69 | {"item": "1 Sunwarp", "display": "1 Sunwarp"}, | ||
| 70 | {"item": "2 Sunwarp", "display": "2 Sunwarp"}, | ||
| 71 | {"item": "3 Sunwarp", "display": "3 Sunwarp"}, | ||
| 72 | {"item": "4 Sunwarp", "display": "4 Sunwarp"}, | ||
| 73 | {"item": "5 Sunwarp", "display": "5 Sunwarp"}, | ||
| 74 | {"item": "6 Sunwarp", "display": "6 Sunwarp"}, | ||
| 65 | ] | 75 | ] |
| 66 | } | 76 | } |
| 67 | 77 | ||
| 68 | const kTHE_END = 0 | 78 | const kTHE_END = 0 |
| 69 | const kTHE_MASTER = 1 | 79 | const kTHE_MASTER = 1 |
| 70 | const kLEVEL_2 = 2 | 80 | const kLEVEL_2 = 2 |
| 81 | const kPILGRIMAGE = 3 | ||
| 71 | 82 | ||
| 72 | const kNO_PANEL_SHUFFLE = 0 | 83 | const kNO_PANEL_SHUFFLE = 0 |
| 73 | const kREARRANGE_PANELS = 1 | 84 | const kREARRANGE_PANELS = 1 |
| @@ -80,6 +91,12 @@ const kCLASSIFICATION_REMOTE_NORMAL = 0 | |||
| 80 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | 91 | const kCLASSIFICATION_REMOTE_REDUCED = 1 |
| 81 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | 92 | const kCLASSIFICATION_REMOTE_INSANITY = 2 |
| 82 | 93 | ||
| 94 | const kSUNWARP_ACCESS_NORMAL = 0 | ||
| 95 | const kSUNWARP_ACCESS_DISABLED = 1 | ||
| 96 | const kSUNWARP_ACCESS_UNLOCK = 2 | ||
| 97 | const kSUNWARP_ACCESS_INDIVIDUAL = 3 | ||
| 98 | const kSUNWARP_ACCESS_PROGRESSIVE = 4 | ||
| 99 | |||
| 83 | var _client = WebSocketClient.new() | 100 | var _client = WebSocketClient.new() |
| 84 | var _should_process = false | 101 | var _should_process = false |
| 85 | var _initiated_disconnect = false | 102 | var _initiated_disconnect = false |
| @@ -111,10 +128,16 @@ var _door_shuffle = false | |||
| 111 | var _color_shuffle = false | 128 | var _color_shuffle = false |
| 112 | var _panel_shuffle = 0 # none, rearrange | 129 | var _panel_shuffle = 0 # none, rearrange |
| 113 | var _painting_shuffle = false | 130 | var _painting_shuffle = false |
| 131 | var _sunwarp_access = 0 # normal, disabled, unlock, progressive | ||
| 114 | var _mastery_achievements = 21 | 132 | var _mastery_achievements = 21 |
| 115 | var _level_2_requirement = 223 | 133 | var _level_2_requirement = 223 |
| 116 | var _location_classification_bit = 0 | 134 | var _location_classification_bit = 0 |
| 117 | var _early_color_hallways = false | 135 | var _early_color_hallways = false |
| 136 | var _pilgrimage_enabled = false | ||
| 137 | var _pilgrimage_allows_roof_access = false | ||
| 138 | var _pilgrimage_allows_paintings = false | ||
| 139 | var _sunwarp_shuffle = false | ||
| 140 | var _sunwarp_mapping = [] | ||
| 118 | var _slot_seed = 0 | 141 | var _slot_seed = 0 |
| 119 | 142 | ||
| 120 | var _map_loaded = false | 143 | var _map_loaded = false |
| @@ -279,6 +302,8 @@ func _on_data(): | |||
| 279 | _painting_shuffle = _slot_data["shuffle_paintings"] | 302 | _painting_shuffle = _slot_data["shuffle_paintings"] |
| 280 | if _slot_data.has("shuffle_panels"): | 303 | if _slot_data.has("shuffle_panels"): |
| 281 | _panel_shuffle = _slot_data["shuffle_panels"] | 304 | _panel_shuffle = _slot_data["shuffle_panels"] |
| 305 | if _slot_data.has("sunwarp_access"): | ||
| 306 | _sunwarp_access = _slot_data["sunwarp_access"] | ||
| 282 | if _slot_data.has("seed"): | 307 | if _slot_data.has("seed"): |
| 283 | _slot_seed = _slot_data["seed"] | 308 | _slot_seed = _slot_data["seed"] |
| 284 | if _slot_data.has("painting_entrance_to_exit"): | 309 | if _slot_data.has("painting_entrance_to_exit"): |
| @@ -296,6 +321,16 @@ func _on_data(): | |||
| 296 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | 321 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY |
| 297 | if _slot_data.has("early_color_hallways"): | 322 | if _slot_data.has("early_color_hallways"): |
| 298 | _early_color_hallways = _slot_data["early_color_hallways"] | 323 | _early_color_hallways = _slot_data["early_color_hallways"] |
| 324 | if _slot_data.has("enable_pilgrimage"): | ||
| 325 | _pilgrimage_enabled = _slot_data["enable_pilgrimage"] | ||
| 326 | if _slot_data.has("pilgrimage_allows_roof_access"): | ||
| 327 | _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"] | ||
| 328 | if _slot_data.has("pilgrimage_allows_paintings"): | ||
| 329 | _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"] | ||
| 330 | if _slot_data.has("shuffle_sunwarps"): | ||
| 331 | _sunwarp_shuffle = _slot_data["shuffle_sunwarps"] | ||
| 332 | if _slot_data.has("sunwarp_permutation"): | ||
| 333 | _sunwarp_mapping = _slot_data["sunwarp_permutation"] | ||
| 299 | 334 | ||
| 300 | _puzzle_skips = 0 | 335 | _puzzle_skips = 0 |
| 301 | 336 | ||
| @@ -659,6 +694,11 @@ func processItem(item, index, from, flags): | |||
| 659 | if painting_node != null: | 694 | if painting_node != null: |
| 660 | painting_node.get_node("Script").movePainting() | 695 | painting_node.get_node("Script").movePainting() |
| 661 | 696 | ||
| 697 | if gamedata.warp_ids_by_item_id.has(int(item)): | ||
| 698 | var warpsNode = get_tree().get_root().get_node("Spatial/Warps") | ||
| 699 | for warp_id in gamedata.warp_ids_by_item_id[int(item)]: | ||
| 700 | warpsNode.get_node(warp_id).unlock_warp() | ||
| 701 | |||
| 662 | # Handle progressive items. | 702 | # Handle progressive items. |
| 663 | if item_name in progressive_items.keys(): | 703 | if item_name in progressive_items.keys(): |
| 664 | if not item_name in _progressive_progress: | 704 | if not item_name in _progressive_progress: |
| @@ -719,6 +759,10 @@ func paintingIsVanilla(painting): | |||
| 719 | return !$Gamedata.mentioned_paintings.has(painting) | 759 | return !$Gamedata.mentioned_paintings.has(painting) |
| 720 | 760 | ||
| 721 | 761 | ||
| 762 | func warpIsVanilla(warp): | ||
| 763 | return !$Gamedata.mentioned_warps.has(warp) | ||
| 764 | |||
| 765 | |||
| 722 | func evaluateSolvability(): | 766 | func evaluateSolvability(): |
| 723 | emit_signal("evaluate_solvability") | 767 | emit_signal("evaluate_solvability") |
| 724 | 768 | ||
| diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 59d2ac2..673c762 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
| @@ -348,6 +348,8 @@ func _load(): | |||
| 348 | victory_condition = "the master" | 348 | victory_condition = "the master" |
| 349 | elif apclient._victory_condition == apclient.kLEVEL_2: | 349 | elif apclient._victory_condition == apclient.kLEVEL_2: |
| 350 | victory_condition = "level 2" | 350 | victory_condition = "level 2" |
| 351 | elif apclient._victory_condition == apclient.kPILGRIMAGE: | ||
| 352 | victory_condition = "pilgrimage" | ||
| 351 | 353 | ||
| 352 | set_static_panel("Entry Room/Panel_this_this", victory_condition) | 354 | set_static_panel("Entry Room/Panel_this_this", victory_condition) |
| 353 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") | 355 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") |
| @@ -552,11 +554,84 @@ func _load(): | |||
| 552 | level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( | 554 | level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( |
| 553 | "answer_correct", apclient, "completedGoal" | 555 | "answer_correct", apclient, "completedGoal" |
| 554 | ) | 556 | ) |
| 557 | elif apclient._victory_condition == apclient.kPILGRIMAGE: | ||
| 558 | var pilgrim_panel = self.get_node("Panels/Lingo Room/Panel_pilgrim") | ||
| 559 | pilgrim_panel.get_node("Viewport/GUI/Panel/TextEdit").connect( | ||
| 560 | "answer_correct", apclient, "completedGoal" | ||
| 561 | ) | ||
| 555 | else: | 562 | else: |
| 556 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") | 563 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") |
| 557 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( | 564 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( |
| 558 | "answer_correct", apclient, "completedGoal" | 565 | "answer_correct", apclient, "completedGoal" |
| 559 | ) | 566 | ) |
| 567 | |||
| 568 | # If pilgrimage does not allow roof access, add a node on the Crossroads | ||
| 569 | # Roof Access stairs that disables it. | ||
| 570 | if !apclient._pilgrimage_allows_roof_access: | ||
| 571 | var terminator = apclient.SCRIPT_pilgrimage_terminator.new() | ||
| 572 | terminator.name = "RoofAccessPilgrimageTerminator" | ||
| 573 | terminator.translation.x = -36 | ||
| 574 | terminator.translation.y = 3 | ||
| 575 | terminator.translation.z = -35 | ||
| 576 | |||
| 577 | var terminator_shape = CollisionShape.new() | ||
| 578 | terminator_shape.shape = BoxShape.new() | ||
| 579 | terminator_shape.shape.extents.x = 0.1 | ||
| 580 | |||
| 581 | terminator.add_child(terminator_shape) | ||
| 582 | get_node("Decorations").add_child(terminator) | ||
| 583 | |||
| 584 | if apclient._sunwarp_shuffle: | ||
| 585 | # Sunwarps 1 and 6 are rotated differently from the rest, so we have to fix that. | ||
| 586 | get_node("Decorations/Teleporter Windows/localmap").rotation_degrees.y = 0 | ||
| 587 | get_node("Decorations/Teleporter Windows/localmap2").rotation_degrees.y = 0 | ||
| 588 | get_node("Decorations/Teleporter Windows/localmap11").rotation_degrees.y = 0 | ||
| 589 | get_node("Decorations/Teleporter Windows/localmap12").rotation_degrees.y = 0 | ||
| 590 | get_node("Decorations/Teleporter Windows/localmap13").rotation_degrees.y = -90 | ||
| 591 | |||
| 592 | get_node("Warps/Teleporter Warps/Sunwarp_enter_1").translation.x = 19.5 | ||
| 593 | get_node("Warps/Teleporter Warps/Sunwarp_exit_1").translation.x = -15.5 | ||
| 594 | get_node("Warps/Teleporter Warps/Sunwarp_enter_6").translation.x = 4.5 | ||
| 595 | get_node("Warps/Teleporter Warps/Sunwarp_exit_6").translation.x = -37.5 | ||
| 596 | get_node("Warps/Teleporter Warps/Sunwarp_exit_7").translation.z = 23.5 | ||
| 597 | |||
| 598 | # Change the sunwarps in accordance with the mapping. | ||
| 599 | var sw_orig_translations = [] | ||
| 600 | var sw_text_translations = [] | ||
| 601 | var sw_text_rotations = [] | ||
| 602 | for i in range(1,7): | ||
| 603 | sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation) | ||
| 604 | sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation) | ||
| 605 | sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees) | ||
| 606 | for i in range(1,7): | ||
| 607 | sw_orig_translations.append(get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation) | ||
| 608 | sw_text_translations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation) | ||
| 609 | sw_text_rotations.append(get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees) | ||
| 610 | |||
| 611 | var sw_enter_indicators = [4, 5, 6, 12, 7, 10] | ||
| 612 | for i in range(1,7): | ||
| 613 | get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i-1]] | ||
| 614 | get_node("Warps/Teleporter Warps/Sunwarp_exit_%d" % i).translation = sw_orig_translations[apclient._sunwarp_mapping[i+5]] | ||
| 615 | |||
| 616 | get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i-1]] | ||
| 617 | get_node("Decorations/Signs/Sunwarp Numbers/enter_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i-1]] | ||
| 618 | |||
| 619 | get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).translation = sw_text_translations[apclient._sunwarp_mapping[i+5]] | ||
| 620 | get_node("Decorations/Signs/Sunwarp Numbers/exit_%d" % i).rotation_degrees = sw_text_rotations[apclient._sunwarp_mapping[i+5]] | ||
| 621 | |||
| 622 | var enter_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["orientation"]) * 90 | ||
| 623 | var exit_rot = _dir_to_int(gamedata.sunwarps[apclient._sunwarp_mapping[i+5]]["orientation"]) * 90 | ||
| 624 | var final_rot = enter_rot - exit_rot | ||
| 625 | if final_rot < 0: | ||
| 626 | final_rot += 360 | ||
| 627 | get_node("Warps/Teleporter Warps/Sunwarp_enter_%d" % i).rotate = str(final_rot) | ||
| 628 | |||
| 629 | var sw_enter_indicator_pos = gamedata.sunwarps[apclient._sunwarp_mapping[i-1]]["entrance_indicator_pos"] | ||
| 630 | var sw_enter_indicator = get_node("Decorations/Signs/Welcome Back Signs/Sign%d" % sw_enter_indicators[i-1]) | ||
| 631 | sw_enter_indicator.translation.x = sw_enter_indicator_pos[0] | ||
| 632 | sw_enter_indicator.translation.y = sw_enter_indicator_pos[1] | ||
| 633 | sw_enter_indicator.translation.z = sw_enter_indicator_pos[2] | ||
| 634 | sw_enter_indicator.rotation_degrees.y = (enter_rot * -1) + 180 | ||
| 560 | 635 | ||
| 561 | # Create the effects node. | 636 | # Create the effects node. |
| 562 | var effects_script = apclient.SCRIPT_effects | 637 | var effects_script = apclient.SCRIPT_effects |
| @@ -674,3 +749,15 @@ func set_small_gridmap_tile(x, y, z, tile): | |||
| 674 | 749 | ||
| 675 | func archipelago_disconnected(reason): | 750 | func archipelago_disconnected(reason): |
| 676 | messages.showMessage(reason) | 751 | messages.showMessage(reason) |
| 752 | |||
| 753 | |||
| 754 | func _dir_to_int(dir): | ||
| 755 | if dir == "north": | ||
| 756 | return 0 | ||
| 757 | elif dir == "west": | ||
| 758 | return 1 | ||
| 759 | elif dir == "south": | ||
| 760 | return 2 | ||
| 761 | elif dir == "east": | ||
| 762 | return 3 | ||
| 763 | return 4 | ||
| diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 5e9c703..999b122 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd | |||
| @@ -86,6 +86,11 @@ func _looked_at(body, painting): | |||
| 86 | body.rotate_y(3 * PI / 2) | 86 | body.rotate_y(3 * PI / 2) |
| 87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) | 87 | body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) |
| 88 | 88 | ||
| 89 | var apclient = global.get_node("Archipelago") | ||
| 90 | if !apclient._pilgrimage_allows_paintings: | ||
| 91 | global.sunwarp = 1 | ||
| 92 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| 93 | |||
| 89 | 94 | ||
| 90 | func _dir_to_int(dir): | 95 | func _dir_to_int(dir): |
| 91 | if dir == "north": | 96 | if dir == "north": |
| diff --git a/Archipelago/painting.gd b/Archipelago/painting.gd new file mode 100644 index 0000000..adc8337 --- /dev/null +++ b/Archipelago/painting.gd | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | extends "res://scripts/painting.gd" | ||
| 2 | |||
| 3 | func _looked_at(var body, var painting): | ||
| 4 | ._looked_at(body, painting) | ||
| 5 | |||
| 6 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
| 7 | var apclient = global.get_node("Archipelago") | ||
| 8 | if !apclient._pilgrimage_allows_paintings: | ||
| 9 | global.sunwarp = 1 | ||
| 10 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| diff --git a/Archipelago/painting_eye.gd b/Archipelago/painting_eye.gd index 53d42b5..c6994b1 100644 --- a/Archipelago/painting_eye.gd +++ b/Archipelago/painting_eye.gd | |||
| @@ -3,9 +3,23 @@ extends "res://scripts/painting_eye.gd" | |||
| 3 | 3 | ||
| 4 | func _answer_correct(): | 4 | func _answer_correct(): |
| 5 | var apclient = global.get_node("Archipelago") | 5 | var apclient = global.get_node("Archipelago") |
| 6 | if not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): | 6 | if get_name() == "pilgrim_painting2": |
| 7 | # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. | ||
| 8 | if apclient._pilgrimage_enabled: | ||
| 9 | movePainting() | ||
| 10 | elif not apclient._door_shuffle or apclient.paintingIsVanilla(self.name): | ||
| 7 | ._answer_correct() | 11 | ._answer_correct() |
| 8 | 12 | ||
| 9 | 13 | ||
| 10 | func movePainting(): | 14 | func movePainting(): |
| 11 | ._answer_correct() | 15 | ._answer_correct() |
| 16 | |||
| 17 | |||
| 18 | func _looked_at(var body, var painting): | ||
| 19 | ._looked_at(body, painting) | ||
| 20 | |||
| 21 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
| 22 | var apclient = global.get_node("Archipelago") | ||
| 23 | if !apclient._pilgrimage_allows_paintings: | ||
| 24 | global.sunwarp = 1 | ||
| 25 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| diff --git a/Archipelago/painting_scenery.gd b/Archipelago/painting_scenery.gd index f49d602..1186e2f 100644 --- a/Archipelago/painting_scenery.gd +++ b/Archipelago/painting_scenery.gd | |||
| @@ -9,3 +9,13 @@ func _answer_correct(): | |||
| 9 | 9 | ||
| 10 | func movePainting(): | 10 | func movePainting(): |
| 11 | ._answer_correct() | 11 | ._answer_correct() |
| 12 | |||
| 13 | |||
| 14 | func _looked_at(var body, var painting): | ||
| 15 | ._looked_at(body, painting) | ||
| 16 | |||
| 17 | if body.is_in_group("player") && (painting.get_name() == self.get_name()): | ||
| 18 | var apclient = global.get_node("Archipelago") | ||
| 19 | if !apclient._pilgrimage_allows_paintings: | ||
| 20 | global.sunwarp = 1 | ||
| 21 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index aec18e8..476d834 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd | |||
| @@ -22,10 +22,6 @@ func _ready(): | |||
| 22 | else: | 22 | else: |
| 23 | atbash_text += old_char | 23 | atbash_text += old_char |
| 24 | 24 | ||
| 25 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").connect( | ||
| 26 | "answer_correct", self, "answer_correct" | ||
| 27 | ) | ||
| 28 | |||
| 29 | 25 | ||
| 30 | func answer_correct(): | 26 | func answer_correct(): |
| 31 | var effects = get_tree().get_root().get_node("Spatial/AP_Effects") | 27 | var effects = get_tree().get_root().get_node("Spatial/AP_Effects") |
| diff --git a/Archipelago/pilgrimage_terminator.gd b/Archipelago/pilgrimage_terminator.gd new file mode 100644 index 0000000..29db2ee --- /dev/null +++ b/Archipelago/pilgrimage_terminator.gd | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | extends Area | ||
| 2 | |||
| 3 | |||
| 4 | func _ready(): | ||
| 5 | var _connected = self.connect("body_entered", self, "_body_entered") | ||
| 6 | |||
| 7 | |||
| 8 | func _body_entered(body): | ||
| 9 | if body.is_in_group("player"): | ||
| 10 | global.sunwarp = 1 | ||
| 11 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index 2cabe09..1a1f5cc 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd | |||
| @@ -24,6 +24,9 @@ func _ready(): | |||
| 24 | apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") | 24 | apclient_instance.SCRIPT_mypainting = load("user://maps/Archipelago/mypainting.gd") |
| 25 | apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") | 25 | apclient_instance.SCRIPT_notifier = load("user://maps/Archipelago/notifier.gd") |
| 26 | apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") | 26 | apclient_instance.SCRIPT_panel = load("user://maps/Archipelago/panel.gd") |
| 27 | apclient_instance.SCRIPT_pilgrimage_terminator = load( | ||
| 28 | "user://maps/Archipelago/pilgrimage_terminator.gd" | ||
| 29 | ) | ||
| 27 | apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") | 30 | apclient_instance.SCRIPT_uuid = load("user://maps/Archipelago/vendor/uuid.gd") |
| 28 | 31 | ||
| 29 | var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") | 32 | var apdata = ResourceLoader.load("user://maps/Archipelago/gamedata.gd") |
| @@ -39,6 +42,7 @@ func _ready(): | |||
| 39 | # Let's also inject any scripts we need to inject now. | 42 | # Let's also inject any scripts we need to inject now. |
| 40 | installScriptExtension(apclient_instance.SCRIPT_doorControl) | 43 | installScriptExtension(apclient_instance.SCRIPT_doorControl) |
| 41 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) | 44 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/load.gd")) |
| 45 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting.gd")) | ||
| 42 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) | 46 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_eye.gd")) |
| 43 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) | 47 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/painting_scenery.gd")) |
| 44 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) | 48 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelLevelSwitch.gd")) |
| @@ -46,6 +50,7 @@ func _ready(): | |||
| 46 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) | 50 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd")) |
| 47 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) | 51 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd")) |
| 48 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) | 52 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd")) |
| 53 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/teleport.gd")) | ||
| 49 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) | 54 | installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd")) |
| 50 | 55 | ||
| 51 | var apclient = global.get_node("Archipelago") | 56 | var apclient = global.get_node("Archipelago") |
| diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd new file mode 100644 index 0000000..532f081 --- /dev/null +++ b/Archipelago/teleport.gd | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | extends "res://scripts/teleport.gd" | ||
| 2 | |||
| 3 | var _unlocked = true | ||
| 4 | |||
| 5 | |||
| 6 | func _ready(): | ||
| 7 | var apclient = global.get_node("Archipelago") | ||
| 8 | if self.get_parent().name == "Teleporter Warps": | ||
| 9 | if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL: | ||
| 10 | _unlocked = false | ||
| 11 | elif apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name): | ||
| 12 | _unlocked = false | ||
| 13 | |||
| 14 | |||
| 15 | func _body_entered(body): | ||
| 16 | if _unlocked: | ||
| 17 | ._body_entered(body) | ||
| 18 | |||
| 19 | if body.is_in_group("player"): | ||
| 20 | var apclient = global.get_node("Archipelago") | ||
| 21 | if !apclient._pilgrimage_enabled: | ||
| 22 | global.sunwarp = 1 | ||
| 23 | body.get_node("pivot/camera/sunwarp_background").visible = false | ||
| 24 | |||
| 25 | |||
| 26 | func unlock_warp(): | ||
| 27 | _unlocked = true | ||
