From 0e10801d335a52d3e88ad02a5f3ff9784a53a119 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 1 May 2024 16:00:34 -0400 Subject: Prevent puzzle skipping locked panels --- Archipelago/panel.gd | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Archipelago/panel.gd') diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index 9d30455..ce632c5 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd @@ -40,25 +40,27 @@ func evaluate_solvability(): solvable = true var missing = [] - if apclient._color_shuffle: + if locked: + solvable = false + elif apclient._color_shuffle: for color in data["color"]: if not apclient._has_colors.has(color): missing.append(color) solvable = false - if locked: - self.get_parent().get_node("Viewport/GUI/Panel/Label").text = "Locked" - self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = false - self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = Color( - 0.2, 0.7, 0.7 - ) - elif solvable: + if solvable: if effects.atbash_remaining > 0: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text else: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = true self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = orig_color + elif locked: + self.get_parent().get_node("Viewport/GUI/Panel/Label").text = "Locked" + self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = false + self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = Color( + 0.2, 0.7, 0.7 + ) else: var missing_text = "Missing: " for thing in missing: -- cgit 1.4.1