Skip to content

Commit

Permalink
Add support for Cricket 24
Browse files Browse the repository at this point in the history
Closes #172
  • Loading branch information
Z1ni committed Jul 31, 2024
1 parent fb22513 commit 746967c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Legend: ✅ Confirmed working, ❔ Unconfirmed, - Not available in the store
| Chorus |||
| Control |||
| Coral Island || - |
| Cricket 24 || - |
| Final Fantasy XV || - |
| Forza Horizon 5 || - |
| Fuga: Melodies of Steel 2 |||
Expand Down
6 changes: 6 additions & 0 deletions games.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@
"name": "Coral Island",
"package": "HumbleBundle.CoralIsland_q2mcdwmzx4qja",
"handler": "coral-island"
},
// Cricket 24
{
"name": "Cricket 24",
"package": "BigbenInteractiveSA.Cricket24Win10_tqjv3vrxr8ppw",
"handler": "cricket-24"
}
]
}
18 changes: 18 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,24 @@ def get_save_paths(
)
)

elif handler_name == "cricket-24":
# 1cnf-folder, but with a file suffix and "CHUNK" suffix removal
# TODO: Can there be more than one chunk?
# Each container represents one folder
for container in containers:
folder_name: str = container["name"]
for file in container["files"]:
fname = file["name"]
fname = fname.removesuffix(".CHUNK0")
if "CHUNK" in fname:
raise Exception(
f"Unexpected chunk name in {file['name']}! Please report this issue on the GitHub repository!"
)
fname += ".SAV"
zip_fname = f"{folder_name}/{fname}"
fpath = file["path"]
save_meta.append((zip_fname, fpath))

elif handler_name == "forza":
# Container name is the filename prefix, file names inside container are appended to that after "."
for container in containers:
Expand Down

0 comments on commit 746967c

Please sign in to comment.