From 692e65f8d168227a4fac97899bea407b1dfafefc Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Fri, 21 Jun 2024 19:31:55 -0400
Subject: Prevent selecting another level after running AP

---
 Archipelago/settings_menu.gd   | 25 +++++++++++++++++++++++++
 Archipelago/settings_screen.gd |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 Archipelago/settings_menu.gd

diff --git a/Archipelago/settings_menu.gd b/Archipelago/settings_menu.gd
new file mode 100644
index 0000000..0efce40
--- /dev/null
+++ b/Archipelago/settings_menu.gd
@@ -0,0 +1,25 @@
+extends "res://scripts/settings_menu.gd"
+
+
+func _ready():
+	var level_tab = get_node("Panel/Tabs/Level")
+	level_tab.get_node("ScrollContainer").queue_free()
+	level_tab.get_node("upload_button").queue_free()
+
+	var new_label = Label.new()
+	new_label.text = "You must restart Lingo before playing a non-Archipelago game."
+	new_label.align = Label.ALIGN_CENTER
+	new_label.valign = Label.VALIGN_CENTER
+	new_label.autowrap = true
+	new_label.margin_left = 25
+	new_label.margin_top = 25
+	new_label.margin_right = 1250
+	new_label.margin_bottom = 492
+
+	var field_font = DynamicFont.new()
+	field_font.font_data = load("res://fonts/Lingo2.ttf")
+	field_font.size = 48
+
+	new_label.add_font_override("font", field_font)
+
+	level_tab.add_child(new_label)
diff --git a/Archipelago/settings_screen.gd b/Archipelago/settings_screen.gd
index 79fdcc3..43c9468 100644
--- a/Archipelago/settings_screen.gd
+++ b/Archipelago/settings_screen.gd
@@ -55,6 +55,7 @@ func _ready():
 		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/panelInput.gd"))
 		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/pause_menu.gd"))
 		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/player.gd"))
+		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/settings_menu.gd"))
 		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/teleport.gd"))
 		installScriptExtension(ResourceLoader.load("user://maps/Archipelago/worldTransporter.gd"))
 
-- 
cgit 1.4.1