diff options
Diffstat (limited to 'Archipelago')
-rw-r--r-- | Archipelago/client.gd | 16 | ||||
-rw-r--r-- | Archipelago/load.gd | 1 | ||||
-rw-r--r-- | Archipelago/location.gd | 4 |
3 files changed, 20 insertions, 1 deletions
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 | |||
48 | const kNO_PANEL_SHUFFLE = 0 | 48 | const kNO_PANEL_SHUFFLE = 0 |
49 | const kREARRANGE_PANELS = 1 | 49 | const kREARRANGE_PANELS = 1 |
50 | 50 | ||
51 | const kCLASSIFICATION_LOCAL_NORMAL = 1 | ||
52 | const kCLASSIFICATION_LOCAL_REDUCED = 2 | ||
53 | const kCLASSIFICATION_LOCAL_INSANITY = 4 | ||
54 | |||
55 | const kCLASSIFICATION_REMOTE_NORMAL = 0 | ||
56 | const kCLASSIFICATION_REMOTE_REDUCED = 1 | ||
57 | const kCLASSIFICATION_REMOTE_INSANITY = 2 | ||
58 | |||
51 | var _client = WebSocketClient.new() | 59 | var _client = WebSocketClient.new() |
52 | var _should_process = false | 60 | var _should_process = false |
53 | var _initiated_disconnect = false | 61 | var _initiated_disconnect = false |
@@ -83,6 +91,7 @@ var _panel_shuffle = 0 # none, rearrange | |||
83 | var _painting_shuffle = false | 91 | var _painting_shuffle = false |
84 | var _mastery_achievements = 21 | 92 | var _mastery_achievements = 21 |
85 | var _level_2_requirement = 223 | 93 | var _level_2_requirement = 223 |
94 | var _location_classification_bit = 0 | ||
86 | var _slot_seed = 0 | 95 | var _slot_seed = 0 |
87 | 96 | ||
88 | var _map_loaded = false | 97 | var _map_loaded = false |
@@ -248,6 +257,13 @@ func _on_data(): | |||
248 | _mastery_achievements = _slot_data["mastery_achievements"] | 257 | _mastery_achievements = _slot_data["mastery_achievements"] |
249 | if _slot_data.has("level_2_requirement"): | 258 | if _slot_data.has("level_2_requirement"): |
250 | _level_2_requirement = _slot_data["level_2_requirement"] | 259 | _level_2_requirement = _slot_data["level_2_requirement"] |
260 | if _slot_data.has("location_checks"): | ||
261 | if _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_NORMAL: | ||
262 | _location_classification_bit = kCLASSIFICATION_LOCAL_NORMAL | ||
263 | elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_REDUCED: | ||
264 | _location_classification_bit = kCLASSIFICATION_LOCAL_REDUCED | ||
265 | elif _slot_data["location_checks"] == kCLASSIFICATION_REMOTE_INSANITY: | ||
266 | _location_classification_bit = kCLASSIFICATION_LOCAL_INSANITY | ||
251 | 267 | ||
252 | _puzzle_skips = 0 | 268 | _puzzle_skips = 0 |
253 | 269 | ||
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(): | |||
118 | var location = location_script.new() | 118 | var location = location_script.new() |
119 | location.ap_id = int(apclient._location_name_to_id[location_id]) | 119 | location.ap_id = int(apclient._location_name_to_id[location_id]) |
120 | location.name = "AP_location_%d" % location.ap_id | 120 | location.name = "AP_location_%d" % location.ap_id |
121 | location.classification = gamedata.classification_by_location_id[location_id] | ||
121 | self.add_child(location) | 122 | self.add_child(location) |
122 | 123 | ||
123 | var panels = gamedata.panel_ids_by_location_id[location_id] | 124 | 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 = "" | |||
4 | var ap_id = 0 | 4 | var ap_id = 0 |
5 | var total = 0 | 5 | var total = 0 |
6 | var solved = 0 | 6 | var solved = 0 |
7 | var classification = 0 | ||
7 | var ran = false | 8 | var ran = false |
8 | 9 | ||
9 | 10 | ||
@@ -14,4 +15,5 @@ func handle_correct(): | |||
14 | ran = true | 15 | ran = true |
15 | 16 | ||
16 | var apclient = global.get_node("Archipelago") | 17 | var apclient = global.get_node("Archipelago") |
17 | apclient.sendLocation(ap_id) | 18 | if classification & apclient._location_classification_bit: |
19 | apclient.sendLocation(ap_id) | ||