From de5eb04ed014770558b546e02c91ce6eb262f652 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 28 Feb 2024 11:41:00 -0500 Subject: Fix sunwarp access --- Archipelago/client.gd | 15 ++++++++------- Archipelago/teleport.gd | 10 +++------- util/generate_gamedata.rb | 11 +++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) 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() diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index 1cce003..4c530f1 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -11,6 +11,7 @@ CLASSIFICATION_INSANITY = 4 panel_to_id = {} door_groups = {} +warp_groups = {} panel_output = [] door_ids_by_item_id = {} @@ -163,6 +164,11 @@ config.each do |room_name, room_data| internal_warp_ids = door["warp_id"] end + if door.include? "group" + warp_groups[door["group"]] ||= Set[] + warp_groups[door["group"]].merge(internal_warp_ids) + end + warp_ids_by_item_id[item_id] = internal_warp_ids mentioned_warps.merge(internal_warp_ids) end @@ -176,6 +182,11 @@ door_groups.each do |group_name, door_ids| door_ids_by_item_id[item_id] = door_ids.to_a end +warp_groups.each do |group_name, warp_ids| + item_id = ids_config["door_groups"][group_name] + warp_ids_by_item_id[item_id] = warp_ids.to_a +end + File.open(outputpath, "w") do |f| f.write "extends Node\n\nvar panels = [" f.write(panel_output.map do |panel| -- cgit 1.4.1