diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-07-30 15:56:23 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-07-30 15:56:23 -0400 |
commit | 62f06090014aee90231eb90da36d5ae1b65171a3 (patch) | |
tree | e60b7bee0d0b10082df81cde7d8e9d0c58bf9929 | |
parent | 80744f7ead1fd6abf391a5ea538d8df49ff19962 (diff) | |
download | lingo-archipelago-62f06090014aee90231eb90da36d5ae1b65171a3.tar.gz lingo-archipelago-62f06090014aee90231eb90da36d5ae1b65171a3.tar.bz2 lingo-archipelago-62f06090014aee90231eb90da36d5ae1b65171a3.zip |
Added LEVEL 2 victory condition
-rw-r--r-- | Archipelago/client.gd | 6 | ||||
-rw-r--r-- | Archipelago/load.gd | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index feeda7e..a816c42 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd | |||
@@ -43,6 +43,7 @@ const progressive_items = { | |||
43 | 43 | ||
44 | const kTHE_END = 0 | 44 | const kTHE_END = 0 |
45 | const kTHE_MASTER = 1 | 45 | const kTHE_MASTER = 1 |
46 | const kLEVEL_2 = 2 | ||
46 | 47 | ||
47 | const kNO_PANEL_SHUFFLE = 0 | 48 | const kNO_PANEL_SHUFFLE = 0 |
48 | const kREARRANGE_PANELS = 1 | 49 | const kREARRANGE_PANELS = 1 |
@@ -81,12 +82,13 @@ var _paintings = {} | |||
81 | var _paintings_mapping = {} | 82 | var _paintings_mapping = {} |
82 | var _localdata_file = "" | 83 | var _localdata_file = "" |
83 | var _death_link = false | 84 | var _death_link = false |
84 | var _victory_condition = 0 # THE END, THE MASTER | 85 | var _victory_condition = 0 # THE END, THE MASTER, LEVEL 2 |
85 | var _door_shuffle = false | 86 | var _door_shuffle = false |
86 | var _color_shuffle = false | 87 | var _color_shuffle = false |
87 | var _panel_shuffle = 0 # none, rearrange | 88 | var _panel_shuffle = 0 # none, rearrange |
88 | var _painting_shuffle = false | 89 | var _painting_shuffle = false |
89 | var _mastery_achievements = 21 | 90 | var _mastery_achievements = 21 |
91 | var _level_2_requirement = 223 | ||
90 | var _slot_seed = 0 | 92 | var _slot_seed = 0 |
91 | 93 | ||
92 | var _map_loaded = false | 94 | var _map_loaded = false |
@@ -267,6 +269,8 @@ func _on_data(): | |||
267 | _paintings_mapping = _slot_data["painting_entrance_to_exit"] | 269 | _paintings_mapping = _slot_data["painting_entrance_to_exit"] |
268 | if _slot_data.has("mastery_achievements"): | 270 | if _slot_data.has("mastery_achievements"): |
269 | _mastery_achievements = _slot_data["mastery_achievements"] | 271 | _mastery_achievements = _slot_data["mastery_achievements"] |
272 | if _slot_data.has("level_2_requirement"): | ||
273 | _level_2_requirement = _slot_data["level_2_requirement"] | ||
270 | 274 | ||
271 | _localdata_file = "user://archipelago_data/%s_%d" % [_seed, _slot] | 275 | _localdata_file = "user://archipelago_data/%s_%d" % [_seed, _slot] |
272 | var ap_file = File.new() | 276 | var ap_file = File.new() |
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index bb14fea..0157395 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -87,6 +87,10 @@ func _load(): | |||
87 | get_node("CountdownPanels").add_child(new_master_cdp) | 87 | get_node("CountdownPanels").add_child(new_master_cdp) |
88 | old_master_cdp.queue_free() | 88 | old_master_cdp.queue_free() |
89 | 89 | ||
90 | # Configure AN OTHER WAY. | ||
91 | var another_cdp = get_node("CountdownPanels/CountdownPanel_level2_0") | ||
92 | another_cdp.maxlength = (apclient._level_2_requirement - 1) | ||
93 | |||
90 | # This is the best time to create the location nodes, since the map is now | 94 | # This is the best time to create the location nodes, since the map is now |
91 | # loaded but the panels haven't been solved from the save file yet. | 95 | # loaded but the panels haven't been solved from the save file yet. |
92 | var panels_parent = self.get_node("Panels") | 96 | var panels_parent = self.get_node("Panels") |
@@ -238,6 +242,8 @@ func _load(): | |||
238 | victory_condition = "the end" | 242 | victory_condition = "the end" |
239 | elif apclient._victory_condition == apclient.kTHE_MASTER: | 243 | elif apclient._victory_condition == apclient.kTHE_MASTER: |
240 | victory_condition = "the master" | 244 | victory_condition = "the master" |
245 | elif apclient._victory_condition == apclient.kLEVEL_2: | ||
246 | victory_condition = "level 2" | ||
241 | 247 | ||
242 | set_static_panel("Entry Room/Panel_this_this", victory_condition) | 248 | set_static_panel("Entry Room/Panel_this_this", victory_condition) |
243 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") | 249 | set_static_panel("Entry Room/Panel_hidden_hidden", "hewwo") |
@@ -366,11 +372,16 @@ func _load(): | |||
366 | apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") | 372 | apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") |
367 | 373 | ||
368 | # Hook up the goal panel. | 374 | # Hook up the goal panel. |
369 | if apclient._victory_condition == 1: | 375 | if apclient._victory_condition == apclient.kTHE_MASTER: |
370 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") | 376 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") |
371 | the_master.get_node("Viewport/GUI/Panel/TextEdit").connect( | 377 | the_master.get_node("Viewport/GUI/Panel/TextEdit").connect( |
372 | "answer_correct", apclient, "completedGoal" | 378 | "answer_correct", apclient, "completedGoal" |
373 | ) | 379 | ) |
380 | elif apclient._victory_condition == apclient.kLEVEL_2: | ||
381 | var level_2 = self.get_node("Decorations/EndPanel/Panel_level_2") | ||
382 | level_2.get_node("Viewport/GUI/Panel/TextEdit").connect( | ||
383 | "answer_correct", apclient, "completedGoal" | ||
384 | ) | ||
374 | else: | 385 | else: |
375 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") | 386 | var the_end = self.get_node("Decorations/EndPanel/Panel_end_end") |
376 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( | 387 | the_end.get_node("Viewport/GUI/Panel/TextEdit").connect( |