File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change
1
+ """Octopath Traveler 2"""
2
+
3
+ from protonfixes import util
4
+
5
+
6
+ def main () -> None :
7
+ """Imports demo saves into the full game's prefix"""
8
+
9
+ util .import_saves_folder (2203230 , f'Documents/My Games/Octopath_Traveler2/Steam/{ util .get_steam_account_id ()} /SaveGames' ,True )
Original file line number Diff line number Diff line change @@ -1007,7 +1007,7 @@ def import_saves_folder(
1007
1007
# Looking for lines of the format
1008
1008
# \t\t"path"\t\t"(the path)"
1009
1009
if '"path"' in i :
1010
- paths .append (i [11 :- 1 ])
1010
+ paths .append (i [11 :- 2 ])
1011
1011
except FileNotFoundError :
1012
1012
log .info ("Could not find Steam's libraryfolders.vdf file." )
1013
1013
return False
@@ -1075,9 +1075,9 @@ def get_steam_account_id() -> str:
1075
1075
"""Returns your 17-digit Steam account ID"""
1076
1076
# The loginusers.vdf file contains information about accounts known to the Steam client, and contains their 17-digit IDs
1077
1077
with open (f'{ os .environ ["STEAM_BASE_FOLDER" ]} /config/loginusers.vdf' ) as f :
1078
- lastFoundId = None
1078
+ lastFoundId = " None"
1079
1079
for i in f .readlines ():
1080
- if len (i ) > 1 and i [2 :- 1 ].isdigit ():
1081
- lastFoundId = i [2 :- 1 ]
1082
- elif i == f'\t \t "AccountName"\t \t "{ os .environ ["SteamUser" ]} "' :
1083
- return lastFoundId
1080
+ if len (i ) > 1 and i [2 :- 2 ].isdigit ():
1081
+ lastFoundId = i [2 :- 2 ]
1082
+ elif i == ( f'\t \t "AccountName"\t \t "{ os .environ ["SteamUser" ]} "\n ' ) :
1083
+ return lastFoundId
You can’t perform that action at this time.
0 commit comments