Skip to content

Commit

Permalink
Add support for Railway Empire 2
Browse files Browse the repository at this point in the history
Closes #76
  • Loading branch information
Z1ni committed Jan 27, 2024
1 parent e2787e5 commit 57e2e23
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Legend: ✅ Confirmed working, ❔ Unconfirmed, - Not available in the store
| Palworld || - |
| Persona 5 Royal || - |
| Persona 5 Tactica || - |
| Railway Empire 2 |||
| Remnant 2 |||
| Remnant: From the Ashes |||
| Starfield || - |
Expand Down
6 changes: 6 additions & 0 deletions games.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@
"name": "State of Decay 2",
"package": "Microsoft.Dayton_8wekyb3d8bbwe",
"handler": "state-of-decay-2"
},
// Railway Empire 2
{
"name": "Railway Empire 2",
"package": "KalypsoMediaGroup.RailwayEmpire2Win_e60j8nnj33ga6",
"handler": "railway-empire-2"
}
]
}
10 changes: 10 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,16 @@ def get_save_paths(
for file in containers[0]["files"]:
fname = file["name"].split("/")[-1] + ".sav"
save_meta.append((fname, file["path"]))

elif handler_name == "railway-empire-2":
# Each container is one file.
# The files inside the container are "savegame" and "description". It seems that we can ignore "description".
for container in containers:
for file in container["files"]:
if file["name"] != "savegame":
continue
save_meta.append((container["name"], file["path"]))

else:
raise Exception('Unsupported XGP app "%s"' % store_pkg_name)

Expand Down

0 comments on commit 57e2e23

Please sign in to comment.