From de5eb04ed014770558b546e02c91ce6eb262f652 Mon Sep 17 00:00:00 2001
From: Star Rauchenberger <fefferburbia@gmail.com>
Date: Wed, 28 Feb 2024 11:41:00 -0500
Subject: Fix sunwarp access

---
 Archipelago/client.gd   | 15 ++++++++-------
 Archipelago/teleport.gd | 10 +++-------
 2 files changed, 11 insertions(+), 14 deletions(-)

(limited to 'Archipelago')

diff --git a/Archipelago/client.gd b/Archipelago/client.gd
index b93e1cc..7cf1d01 100644
--- a/Archipelago/client.gd
+++ b/Archipelago/client.gd
@@ -65,12 +65,12 @@ const progressive_items = {
 	],
 	"Progressive Pilgrimage":
 	[
-		{"item": "Hub Room - 1 Sunwarp", "display": "1 Sunwarp"},
-		{"item": "Orange Tower Fourth Floor - 2 Sunwarp", "display": "2 Sunwarp"},
-		{"item": "Orange Tower Third Floor - 3 Sunwarp", "display": "3 Sunwarp"},
-		{"item": "Orange Tower First Floor - 4 Sunwarp", "display": "4 Sunwarp"},
-		{"item": "Orange Tower Fourth Floor - 5 Sunwarp", "display": "5 Sunwarp"},
-		{"item": "Outside The Agreeable - 6 Sunwarp", "display": "6 Sunwarp"},
+		{"item": "1 Sunwarp", "display": "1 Sunwarp"},
+		{"item": "2 Sunwarp", "display": "2 Sunwarp"},
+		{"item": "3 Sunwarp", "display": "3 Sunwarp"},
+		{"item": "4 Sunwarp", "display": "4 Sunwarp"},
+		{"item": "5 Sunwarp", "display": "5 Sunwarp"},
+		{"item": "6 Sunwarp", "display": "6 Sunwarp"},
 	]
 }
 
@@ -93,7 +93,8 @@ const kCLASSIFICATION_REMOTE_INSANITY = 2
 const kSUNWARP_ACCESS_NORMAL = 0
 const kSUNWARP_ACCESS_DISABLED = 1
 const kSUNWARP_ACCESS_UNLOCK = 2
-const kSUNWARP_ACCESS_PROGRESSIVE = 3
+const kSUNWARP_ACCESS_INDIVIDUAL = 3
+const kSUNWARP_ACCESS_PROGRESSIVE = 4
 
 var _client = WebSocketClient.new()
 var _should_process = false
diff --git a/Archipelago/teleport.gd b/Archipelago/teleport.gd
index d322722..66e26dd 100644
--- a/Archipelago/teleport.gd
+++ b/Archipelago/teleport.gd
@@ -5,13 +5,9 @@ var _unlocked = true
 
 func _ready():
 	var apclient = global.get_node("Archipelago")
-	if apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name):
-		if self.get_parent().name == "Teleporter Warps":
-			if apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL:
-				_unlocked = false
-		else:
-			_unlocked = false
-
+	if (apclient._sunwarp_access != apclient.kSUNWARP_ACCESS_NORMAL and self.get_parent().name == "Teleporter Warps") or (apclient._door_shuffle and !apclient.warpIsVanilla(self.get_parent().name + "/" + self.name)):
+		_unlocked = false
+	
 	._ready()
 
 
-- 
cgit 1.4.1