diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-01 16:00:34 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-01 16:00:34 -0400 |
commit | 0e10801d335a52d3e88ad02a5f3ff9784a53a119 (patch) | |
tree | 1f18e7b4e95d0953a95abf1c4ce4ee157eb3ea3e | |
parent | fad5732724e672735062502d94300c36551148de (diff) | |
download | lingo-archipelago-0e10801d335a52d3e88ad02a5f3ff9784a53a119.tar.gz lingo-archipelago-0e10801d335a52d3e88ad02a5f3ff9784a53a119.tar.bz2 lingo-archipelago-0e10801d335a52d3e88ad02a5f3ff9784a53a119.zip |
Prevent puzzle skipping locked panels
-rw-r--r-- | Archipelago/panel.gd | 18 |
1 files changed, 10 insertions, 8 deletions
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(): | |||
40 | solvable = true | 40 | solvable = true |
41 | var missing = [] | 41 | var missing = [] |
42 | 42 | ||
43 | if apclient._color_shuffle: | 43 | if locked: |
44 | solvable = false | ||
45 | elif apclient._color_shuffle: | ||
44 | for color in data["color"]: | 46 | for color in data["color"]: |
45 | if not apclient._has_colors.has(color): | 47 | if not apclient._has_colors.has(color): |
46 | missing.append(color) | 48 | missing.append(color) |
47 | solvable = false | 49 | solvable = false |
48 | 50 | ||
49 | if locked: | 51 | if solvable: |
50 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = "Locked" | ||
51 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = false | ||
52 | self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = Color( | ||
53 | 0.2, 0.7, 0.7 | ||
54 | ) | ||
55 | elif solvable: | ||
56 | if effects.atbash_remaining > 0: | 52 | if effects.atbash_remaining > 0: |
57 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text | 53 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text |
58 | else: | 54 | else: |
59 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text | 55 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text |
60 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = true | 56 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = true |
61 | self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = orig_color | 57 | self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = orig_color |
58 | elif locked: | ||
59 | self.get_parent().get_node("Viewport/GUI/Panel/Label").text = "Locked" | ||
60 | self.get_parent().get_node("Viewport/GUI/Panel/TextEdit").editable = false | ||
61 | self.get_parent().get_node("Quad").get_surface_material(0).albedo_color = Color( | ||
62 | 0.2, 0.7, 0.7 | ||
63 | ) | ||
62 | else: | 64 | else: |
63 | var missing_text = "Missing: " | 65 | var missing_text = "Missing: " |
64 | for thing in missing: | 66 | for thing in missing: |