From a2138459de0ef60fa446be9b70310b11aaf78610 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 22 Aug 2023 12:20:28 -0400 Subject: Only necessary checks are sent out now i.e. the checks for every individual panel are not sent out if you are not playing panelsanity. --- Archipelago/client.gd | 16 ++++++++++++++++ Archipelago/load.gd | 1 + Archipelago/location.gd | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'Archipelago') diff --git a/Archipelago/client.gd b/Archipelago/client.gd index ad37ef0..17c6063 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd @@ -48,6 +48,14 @@ const kLEVEL_2 = 2 const kNO_PANEL_SHUFFLE = 0 const kREARRANGE_PANELS = 1 +const kCLASSIFICATION_LOCAL_NORMAL = 1 +const kCLASSIFICATION_LOCAL_REDUCED = 2 +const kCLASSIFICATION_LOCAL_INSANITY = 4 + +const kCLASSIFICATION_REMOTE_NORMAL = 0 +const kCLASSIFICATION_REMOTE_REDUCED = 1 +const kCLASSIFICATION_REMOTE_INSANITY = 2 + var _client = WebSocketClient.new() var _should_process = false var _initiated_disconnect = false @@ -83,6 +91,7 @@ var _panel_shuffle = 0 # none, rearrange var _painting_shuffle = false var _mastery_achievements = 21 var _level_2_requirement = 223 +var _location_classification_bit = 0 var _slot_seed = 0 var _map_loaded = false @@ -248,6 +257,13 @@ func _on_data(): _mastery_achievements = _slot_data["mastery_achievements"] if _slot_data.has("level_2_requirement"): _level_2_requirement = _slot_data["level_2_requirement"] + if _slot_data.has("location_checks"): + if _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_NORMAL: + _location_classification_bit = kCLASSIFICATION_LOCAL_NORMAL + elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_REDUCED: + _location_classification_bit = kCLASSIFICATION_LOCAL_REDUCED + elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_INSANITY: + _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY _puzzle_skips = 0 diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 33a5846..876910b 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -118,6 +118,7 @@ func _load(): var location = location_script.new() location.ap_id = int(apclient._location_name_to_id[location_id]) location.name = "AP_location_%d" % location.ap_id + location.classification = gamedata.classification_by_location_id[location_id] self.add_child(location) var panels = gamedata.panel_ids_by_location_id[location_id] diff --git a/Archipelago/location.gd b/Archipelago/location.gd index b85b5c4..7e76427 100644 --- a/Archipelago/location.gd +++ b/Archipelago/location.gd @@ -4,6 +4,7 @@ var ap_name = "" var ap_id = 0 var total = 0 var solved = 0 +var classification = 0 var ran = false @@ -14,4 +15,5 @@ func handle_correct(): ran = true var apclient = global.get_node("Archipelago") - apclient.sendLocation(ap_id) + if classification & apclient._location_classification_bit: + apclient.sendLocation(ap_id) -- cgit 1.4.1