about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-28 11:21:08 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-28 11:21:08 -0400
commit0ef9d820818c6768060eca0a692c87d29bea8f95 (patch)
treeb050fa008263e0f38c657b43e4d41cefd7de5d9e
parent1969ba557fcbf352f4ec546fd1c9467762291f08 (diff)
downloadlingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.tar.gz
lingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.tar.bz2
lingo-archipelago-0ef9d820818c6768060eca0a692c87d29bea8f95.zip
Progressive Art Gallery and Hallway Room
Also, Art Gallery is now changed a little in doors mode. The backroom is always available so that you have access to the previous floors at all times. The paintings in the backroom do not appear until you have the floor unlocked. ORDER is also blocked off until you get the fifth floor.
-rw-r--r--Archipelago/client.gd60
-rw-r--r--Archipelago/load.gd27
-rw-r--r--Archipelago/painting_scenery.gd11
-rw-r--r--Archipelago/settings_screen.gd1
4 files changed, 84 insertions, 15 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 46b9ff0..be65eb2 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -6,10 +6,35 @@ var ap_pass = ""
6 6
7const my_version = "0.2.3" 7const my_version = "0.2.3"
8const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"} 8const ap_version = {"major": 0, "minor": 4, "build": 0, "class": "Version"}
9const orange_tower = ["Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh"]
10const color_items = [ 9const color_items = [
11 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow" 10 "White", "Black", "Red", "Blue", "Green", "Brown", "Gray", "Orange", "Purple", "Yellow"
12] 11]
12const progressive_items = {
13 "Progressive Orange Tower":
14 [
15 {"item": "Orange Tower - Second Floor", "display": "Second Floor"},
16 {"item": "Orange Tower - Third Floor", "display": "Third Floor"},
17 {"item": "Orange Tower - Fourth Floor", "display": "Fourth Floor"},
18 {"item": "Orange Tower - Fifth Floor", "display": "Fifth Floor"},
19 {"item": "Orange Tower - Sixth Floor", "display": "Sixth Floor"},
20 {"item": "Orange Tower - Seventh Floor", "display": "Seventh Floor"},
21 ],
22 "Progressive Art Gallery":
23 [
24 {"item": "Art Gallery - Second Floor", "display": "Second Floor"},
25 {"item": "Art Gallery - Third Floor", "display": "Third Floor"},
26 {"item": "Art Gallery - Fourth Floor", "display": "Fourth Floor"},
27 {"item": "Art Gallery - Fifth Floor", "display": "Fifth Floor"},
28 {"item": "Art Gallery - Exit", "display": "Exit"},
29 ],
30 "Progressive Hallway Room":
31 [
32 {"item": "Outside The Agreeable - Hallway Door", "display": "First Door"},
33 {"item": "Hallway Room (2) - Exit", "display": "Second Door"},
34 {"item": "Hallway Room (3) - Exit", "display": "Third Door"},
35 {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"},
36 ]
37}
13 38
14const kTHE_END = 0 39const kTHE_END = 0
15const kTHE_MASTER = 1 40const kTHE_MASTER = 1
@@ -61,7 +86,7 @@ var _map_loaded = false
61var _held_items = [] 86var _held_items = []
62var _held_locations = [] 87var _held_locations = []
63var _last_new_item = -1 88var _last_new_item = -1
64var _tower_floors = 0 89var _progressive_progress = {}
65var _has_colors = ["white"] 90var _has_colors = ["white"]
66 91
67signal could_not_connect 92signal could_not_connect
@@ -287,7 +312,7 @@ func _on_data():
287 if message["index"] == 0: 312 if message["index"] == 0:
288 # We are being sent all of our items, so lets reset any progress 313 # We are being sent all of our items, so lets reset any progress
289 # on progressive items. 314 # on progressive items.
290 _tower_floors = 0 315 _progressive_progress.clear()
291 _held_items = [] 316 _held_items = []
292 317
293 var i = 0 318 var i = 0
@@ -526,12 +551,20 @@ func processItem(item, index, from, flags):
526 if painting_node != null: 551 if painting_node != null:
527 painting_node.get_node("Script").movePainting() 552 painting_node.get_node("Script").movePainting()
528 553
529 # Handle progressively opening up the tower. 554 # Handle progressive items.
530 if _item_name_to_id["Progressive Orange Tower"] == item and _tower_floors < orange_tower.size(): 555 var item_name = "Unknown"
531 var subitem_name = "Orange Tower - %s Floor" % orange_tower[_tower_floors] 556 if _item_id_to_name.has(item):
532 global._print(subitem_name) 557 item_name = _item_id_to_name[item]
533 processItem(_item_name_to_id[subitem_name], null, null, null) 558
534 _tower_floors += 1 559 if item_name in progressive_items.keys():
560 if not item_name in _progressive_progress:
561 _progressive_progress[item_name] = 0
562
563 if _progressive_progress[item_name] < progressive_items[item_name].size():
564 var subitem_name = progressive_items[item_name][_progressive_progress[item_name]]["item"]
565 global._print(subitem_name)
566 processItem(_item_name_to_id[subitem_name], null, null, null)
567 _progressive_progress[item_name] += 1
535 568
536 if _color_shuffle and color_items.has(_item_id_to_name[item]): 569 if _color_shuffle and color_items.has(_item_id_to_name[item]):
537 var lcol = _item_id_to_name[item].to_lower() 570 var lcol = _item_id_to_name[item].to_lower()
@@ -544,12 +577,9 @@ func processItem(item, index, from, flags):
544 _last_new_item = index 577 _last_new_item = index
545 saveLocaldata() 578 saveLocaldata()
546 579
547 var item_name = "Unknown" 580 if item_name in progressive_items:
548 if _item_id_to_name.has(item): 581 var subitem = progressive_items[item_name][_progressive_progress[item_name] - 1]
549 item_name = _item_id_to_name[item] 582 item_name += " (%s)" % subitem["display"]
550
551 if item_name == "Progressive Orange Tower":
552 item_name = "Progressive Orange Tower (%s Floor)" % orange_tower[_tower_floors - 1]
553 583
554 var player_name = "Unknown" 584 var player_name = "Unknown"
555 if _player_name_by_slot.has(from): 585 if _player_name_by_slot.has(from):
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index e3ae24e..76015e9 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd
@@ -175,6 +175,33 @@ func _load():
175 var chosen_painting = remaining[rng.randi_range(0, remaining.size() - 1)] 175 var chosen_painting = remaining[rng.randi_range(0, remaining.size() - 1)]
176 instantiate_painting(painting, chosen_painting) 176 instantiate_painting(painting, chosen_painting)
177 177
178 # If door shuffle is on, we need to make some changes to the Art Gallery.
179 # The player should always have access to the backroom, but they shouldn't
180 # have access to ORDER until getting the fifth floor, so will move the
181 # backroom door. Also, the paintings in the backroom should only show up as
182 # the player gets the progressive art gallery items.
183 if apclient._door_shuffle:
184 var backroom_door = get_node("Doors/Tower Room Area Doors/Door_painting_backroom")
185 backroom_door.translation.x = 97
186 backroom_door.translation.y = 0
187 backroom_door.translation.z = 39
188 backroom_door.scale.x = 2
189 backroom_door.scale.y = 2.5
190 backroom_door.scale.z = 1
191
192 for i in range(2, 6):
193 var painting_path = "Decorations/Paintings/scenery_painting_%db" % i
194 var painting_node = get_node(painting_path)
195 var rotate = painting_node.rotate
196 var target = painting_node.target
197 painting_node.set_script(load("res://scripts/painting_eye.gd"))
198 painting_node.rotate = rotate
199 painting_node.target = target
200 painting_node.move_to_x = painting_node.translation.x
201 painting_node.move_to_z = painting_node.translation.z
202 painting_node.translation.x = 88
203 painting_node.translation.z = 39
204
178 # Attach a script to every panel so that we can do things like conditionally 205 # Attach a script to every panel so that we can do things like conditionally
179 # disable them. 206 # disable them.
180 var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd") 207 var panel_script = ResourceLoader.load("user://maps/Archipelago/panel.gd")
diff --git a/Archipelago/painting_scenery.gd b/Archipelago/painting_scenery.gd new file mode 100644 index 0000000..f49d602 --- /dev/null +++ b/Archipelago/painting_scenery.gd
@@ -0,0 +1,11 @@
1extends "res://scripts/painting_scenery.gd"
2
3
4func _answer_correct():
5 var apclient = global.get_node("Archipelago")
6 if not apclient._door_shuffle or apclient.paintingIsVanilla(self.name):
7 ._answer_correct()
8
9
10func movePainting():
11 ._answer_correct()
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd index e8f88e7..890afaa 100644 --- a/Archipelago/settings_screen.gd +++ b/Archipelago/settings_screen.gd
@@ -22,6 +22,7 @@ func _ready():
22 installScriptExtension("user://maps/Archipelago/doorControl.gd") 22 installScriptExtension("user://maps/Archipelago/doorControl.gd")
23 installScriptExtension("user://maps/Archipelago/load.gd") 23 installScriptExtension("user://maps/Archipelago/load.gd")
24 installScriptExtension("user://maps/Archipelago/painting_eye.gd") 24 installScriptExtension("user://maps/Archipelago/painting_eye.gd")
25 installScriptExtension("user://maps/Archipelago/painting_scenery.gd")
25 installScriptExtension("user://maps/Archipelago/panelLevelSwitch.gd") 26 installScriptExtension("user://maps/Archipelago/panelLevelSwitch.gd")
26 installScriptExtension("user://maps/Archipelago/panelEnd.gd") 27 installScriptExtension("user://maps/Archipelago/panelEnd.gd")
27 installScriptExtension("user://maps/Archipelago/pause_menu.gd") 28 installScriptExtension("user://maps/Archipelago/pause_menu.gd")