From 46623fb9dc34c4e44859f437f752206e1889dbce Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 5 May 2023 12:20:16 -0400 Subject: THE MASTER requirement can now be set by the player --- Archipelago/client.gd | 3 +++ Archipelago/load.gd | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Archipelago/client.gd b/Archipelago/client.gd index fc85f31..a3199ba 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -80,6 +80,7 @@ var _door_shuffle = false var _color_shuffle = false var _panel_shuffle = 0 # none, rearrange var _painting_shuffle = false +var _mastery_achievements = 21 var _slot_seed = 0 var _map_loaded = false @@ -252,6 +253,8 @@ func _on_data(): _slot_seed = _slot_data["seed"] if _slot_data.has("painting_entrance_to_exit"): _paintings_mapping = _slot_data["painting_entrance_to_exit"] + if _slot_data.has("mastery_achievements"): + _mastery_achievements = _slot_data["mastery_achievements"] _localdata_file = "user://archipelago_data/%s_%d" % [_seed, _slot] var ap_file = File.new() diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 56991fb..c637ccb 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -58,6 +58,19 @@ func _load(): wanderer_achieve.translation = Vector3(-51, -33, 35) # way under the map + # Set up The Master to be variable. + var old_master_cdp = get_node("CountdownPanels/CountdownPanel_countdown_16") + var cdp_auto_scene = load("res://nodes/panel_countdown_auto.tscn") + var new_master_cdp = cdp_auto_scene.instance() + new_master_cdp.name = "AP_variable_master" + new_master_cdp.replace_with = old_master_cdp.replace_with + new_master_cdp.panels = "../../Panels/Countdown Panels" + new_master_cdp.maxlength = apclient._mastery_achievements + new_master_cdp.translation = old_master_cdp.translation + new_master_cdp.rotation = old_master_cdp.rotation + get_node("CountdownPanels").add_child(new_master_cdp) + old_master_cdp.queue_free() + # This is the best time to create the location nodes, since the map is now # loaded but the panels haven't been solved from the save file yet. var panels_parent = self.get_node("Panels") -- cgit 1.4.1