about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-28 12:35:45 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-28 12:35:45 -0500
commit4d2da5afe6a3ffad50ca5560c1dcceaddde2b9b0 (patch)
tree4164ea81516c7446f8b6577492011b65682472f9 /Archipelago
parentde5eb04ed014770558b546e02c91ce6eb262f652 (diff)
downloadlingo-archipelago-4d2da5afe6a3ffad50ca5560c1dcceaddde2b9b0.tar.gz
lingo-archipelago-4d2da5afe6a3ffad50ca5560c1dcceaddde2b9b0.tar.bz2
lingo-archipelago-4d2da5afe6a3ffad50ca5560c1dcceaddde2b9b0.zip
Add pilgrimage allows roof access / paintings
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/client.gd9
-rw-r--r--Archipelago/load.gd16
-rw-r--r--Archipelago/mypainting.gd14
-rw-r--r--Archipelago/painting.gd10
-rw-r--r--Archipelago/painting_eye.gd16
-rw-r--r--Archipelago/painting_scenery.gd10
-rw-r--r--Archipelago/panel.gd4
-rw-r--r--Archipelago/pilgrimage_terminator.gd11
-rw-r--r--Archipelago/settings_screen.gd4
-rw-r--r--Archipelago/teleport.gd15
10 files changed, 92 insertions, 17 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 7cf1d01..964c642 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -7,6 +7,7 @@ var SCRIPT_multiplayer
7var SCRIPT_mypainting 7var SCRIPT_mypainting
8var SCRIPT_notifier 8var SCRIPT_notifier
9var SCRIPT_panel 9var SCRIPT_panel
10var SCRIPT_pilgrimage_terminator
10var SCRIPT_uuid 11var SCRIPT_uuid
11 12
12var ap_server = "" 13var ap_server = ""
@@ -133,6 +134,8 @@ var _level_2_requirement = 223
133var _location_classification_bit = 0 134var _location_classification_bit = 0
134var _early_color_hallways = false 135var _early_color_hallways = false
135var _pilgrimage_enabled = false 136var _pilgrimage_enabled = false
137var _pilgrimage_allows_roof_access = false
138var _pilgrimage_allows_paintings = false
136var _slot_seed = 0 139var _slot_seed = 0
137 140
138var _map_loaded = false 141var _map_loaded = false
@@ -315,6 +318,10 @@ func _on_data():
315 _early_color_hallways = _slot_data["early_color_hallways"] 318 _early_color_hallways = _slot_data["early_color_hallways"]
316 if _slot_data.has("enable_pilgrimage"): 319 if _slot_data.has("enable_pilgrimage"):
317 _pilgrimage_enabled = _slot_data["enable_pilgrimage"] 320 _pilgrimage_enabled = _slot_data["enable_pilgrimage"]
321 if _slot_data.has("pilgrimage_allows_roof_access"):
322 _pilgrimage_allows_roof_access = _slot_data["pilgrimage_allows_roof_access"]
323 if _slot_data.has("pilgrimage_allows_paintings"):
324 _pilgrimage_allows_paintings = _slot_data["pilgrimage_allows_paintings"]
318 325
319 _puzzle_skips = 0 326 _puzzle_skips = 0
320 327
@@ -654,7 +661,7 @@ func processItem(item, index, from, flags):
654 painting_node = fake_parent_node.get_node_or_null(painting_id) 661 painting_node = fake_parent_node.get_node_or_null(painting_id)
655 if painting_node != null: 662 if painting_node != null:
656 painting_node.get_node("Script").movePainting() 663 painting_node.get_node("Script").movePainting()
657 664
658 if gamedata.warp_ids_by_item_id.has(int(item)): 665 if gamedata.warp_ids_by_item_id.has(int(item)):
659 var warpsNode = get_tree().get_root().get_node("Spatial/Warps") 666 var warpsNode = get_tree().get_root().get_node("Spatial/Warps")
660 for warp_id in gamedata.warp_ids_by_item_id[int(item)]: 667 for warp_id in gamedata.warp_ids_by_item_id[int(item)]:
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index d9b37da..bca0742 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -550,6 +550,22 @@ func _load():
550 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( 550 the_end.get_node("Viewport/GUI/Panel/TextEdit").connect(
551 "answer_correct", apclient, "completedGoal" 551 "answer_correct", apclient, "completedGoal"
552 ) 552 )
553
554 # If pilgrimage does not allow roof access, add a node on the Crossroads
555 # Roof Access stairs that disables it.
556 if !apclient._pilgrimage_allows_roof_access:
557 var terminator = apclient.SCRIPT_pilgrimage_terminator.new()
558 terminator.name = "RoofAccessPilgrimageTerminator"
559 terminator.translation.x = -36
560 terminator.translation.y = 3
561 terminator.translation.z = -35
562
563 var terminator_shape = CollisionShape.new()
564 terminator_shape.shape = BoxShape.new()
565 terminator_shape.shape.extents.x = 0.1
566
567 terminator.add_child(terminator_shape)
568 get_node("Decorations").add_child(terminator)
553 569
554 # Create the effects node. 570 # Create the effects node.
555 var effects_script = apclient.SCRIPT_effects 571 var effects_script = apclient.SCRIPT_effects
diff --git a/Archipelago/mypainting.gd b/Archipelago/mypainting.gd index 1420c03..999b122 100644 --- a/Archipelago/mypainting.gd +++ b/Archipelago/mypainting.gd
@@ -20,13 +20,8 @@ func _ready():
20 20
21func _answer_correct(): 21func _answer_correct():
22 var apclient = global.get_node("Archipelago") 22 var apclient = global.get_node("Archipelago")
23 if self.get_parent().name == "pilgrim_painting2": 23 if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name):
24 # When pilgrimage is enabled, the HOT CRUST panel should actually move the sun painting. 24 movePainting()
25 if apclient._pilgrimage_enabled:
26 movePainting()
27 else:
28 if not apclient._door_shuffle or apclient.paintingIsVanilla(self.get_parent().name):
29 movePainting()
30 25
31 26
32func movePainting(): 27func movePainting():
@@ -91,6 +86,11 @@ func _looked_at(body, painting):
91 body.rotate_y(3 * PI / 2) 86 body.rotate_y(3 * PI / 2)
92 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)
93 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
94 94
95func _dir_to_int(dir): 95func _dir_to_int(dir):
96 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 @@
1extends "res://scripts/painting.gd"
2
3func _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
4func _answer_correct(): 4func _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
10func movePainting(): 14func movePainting():
11 ._answer_correct() 15 ._answer_correct()
16
17
18func _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
10func movePainting(): 10func movePainting():
11 ._answer_correct() 11 ._answer_correct()
12
13
14func _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 da5b572..ce5a642 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
30func answer_correct(): 26func 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 @@
1extends Area
2
3
4func _ready():
5 var _connected = self.connect("body_entered", self, "_body_entered")
6
7
8func _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 0ae218e..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"))
diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd index 66e26dd..532f081 100644 --- a/Archipelago/teleport.gd +++ b/Archipelago/teleport.gd
@@ -5,16 +5,23 @@ var _unlocked = true
5 5
6func _ready(): 6func _ready():
7 var apclient = global.get_node("Archipelago") 7 var apclient = global.get_node("Archipelago")
8 if (apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL and self.get_parent().name == "Teleporter Warps") or (apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name)): 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):
9 _unlocked = false 12 _unlocked = false
10
11 ._ready()
12 13
13 14
14func _body_entered(var body): 15func _body_entered(body):
15 if _unlocked: 16 if _unlocked:
16 ._body_entered(body) 17 ._body_entered(body)
17 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
18 25
19func unlock_warp(): 26func unlock_warp():
20 _unlocked = true 27 _unlocked = true