about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-04-29 15:12:33 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-04-29 15:12:33 -0400
commitb393c9d6772c13177fd575cda8c76d96afc178d2 (patch)
treefa76071215f1f1819f89379a532567a9c698bc5d
parentf375fd15a4271489e27d4d49194befa66dcdea97 (diff)
downloadlingo-archipelago-b393c9d6772c13177fd575cda8c76d96afc178d2.tar.gz
lingo-archipelago-b393c9d6772c13177fd575cda8c76d96afc178d2.tar.bz2
lingo-archipelago-b393c9d6772c13177fd575cda8c76d96afc178d2.zip
Don't download datapackages for big games
Godot's websocket packet size limit can't be changed in 3.5, which is annoying.
-rw-r--r--Archipelago/client.gd13
1 files changed, 11 insertions, 2 deletions
diff --git a/Archipelago/client.gd b/Archipelago/client.gd index 2f5b631..e182b9c 100644 --- a/Archipelago/client.gd +++ b/Archipelago/client.gd
@@ -35,6 +35,7 @@ const progressive_items = {
35 {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"}, 35 {"item": "Hallway Room (4) - Exit", "display": "Fourth Door"},
36 ] 36 ]
37} 37}
38const filtered_games = ["Ocarina of Time", "Factorio", "Lufia II Ancient Cave"]
38 39
39const kTHE_END = 0 40const kTHE_END = 0
40const kTHE_MASTER = 1 41const kTHE_MASTER = 1
@@ -178,9 +179,17 @@ func _on_data():
178 179
179 var needed_games = [] 180 var needed_games = []
180 for game in message["datapackage_checksums"].keys(): 181 for game in message["datapackage_checksums"].keys():
182 # Due to a limitation with Godot 3.x, downloading a datapackage
183 # that is too large will silently fail and prevent us from
184 # finishing the connection process. So we will hardcode the
185 # names of games that are likely to cause connection problems,
186 # and not download those datapackages. Which is not ideal.
181 if ( 187 if (
182 !_datapackages.has(game) 188 (
183 or _datapackages[game]["checksum"] != message["datapackage_checksums"][game] 189 !_datapackages.has(game)
190 or _datapackages[game]["checksum"] != message["datapackage_checksums"][game]
191 )
192 and not filtered_games.has(game)
184 ): 193 ):
185 needed_games.append(game) 194 needed_games.append(game)
186 195