Skip to content

Commit e980eea

Browse files
committed
Update game_stalker2heartofchornobyl.py
1 parent 3730421 commit e980eea

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

games/game_stalker2heartofchornobyl.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,16 @@ def __init__(self):
5353
def resolve_path(self, path: str) -> str:
5454
path = path.replace("%USERPROFILE%", os.environ.get("USERPROFILE", ""))
5555

56-
5756
if "%GAME_DOCUMENTS%" in path:
5857
game_docs = self.GameDocumentsDirectory.replace(
5958
"%USERPROFILE%", os.environ.get("USERPROFILE", "")
6059
)
6160
path = path.replace("%GAME_DOCUMENTS%", game_docs)
6261

63-
6462
if "%GAME_PATH%" in path:
6563
game_path = self._gamePath if hasattr(self, "_gamePath") else ""
6664
path = path.replace("%GAME_PATH%", game_path)
6765

68-
6966
return path
7067

7168
def init(self, organizer: mobase.IOrganizer) -> bool:
@@ -138,20 +135,16 @@ def mappings(self) -> List[mobase.Mapping]:
138135
pak_extensions = ["*.pak", "*.utoc", "*.ucas"]
139136
target_dir = "Content/Paks/~mods/"
140137

141-
142138
mappings = []
143139

144-
145140
for ext in pak_extensions:
146141
mappings.append(mobase.Mapping(ext, target_dir, False))
147142

148-
149143
source_dirs = ["Paks/", "~mods/", "Content/Paks/~mods/"]
150144
for source_dir in source_dirs:
151145
for ext in pak_extensions:
152146
mappings.append(mobase.Mapping(f"{source_dir}{ext}", target_dir, False))
153147

154-
155148
return mappings
156149

157150
def gameDirectory(self) -> QDir:
@@ -163,7 +156,6 @@ def paksDirectory(self) -> QDir:
163156
)
164157
return QDir(path)
165158

166-
167159
def paksModsDirectory(self) -> QDir:
168160
try:
169161
path = os.path.join(self.paksDirectory().absolutePath(), "~mods")
@@ -178,7 +170,6 @@ def paksModsDirectory(self) -> QDir:
178170
)
179171
return QDir(fallback)
180172

181-
182173
def logicModsDirectory(self) -> QDir:
183174
path = os.path.join(
184175
self.gameDirectory().absolutePath(),
@@ -189,7 +180,6 @@ def logicModsDirectory(self) -> QDir:
189180
)
190181
return QDir(path)
191182

192-
193183
def binariesDirectory(self) -> QDir:
194184
path = os.path.join(
195185
self.gameDirectory().absolutePath(),
@@ -232,8 +222,10 @@ def fullDescription(self, key: int) -> str:
232222
match key:
233223
case Problems.MISPLACED_PAK_FILES:
234224
return (
235-
"Some mod packages contain PAK files that are not placed in the correct directory structure.\n\n"
236-
"PAK files should be placed in one of the following locations within the mod:\n"
225+
"Some mod packages contain PAK files that are not placed in the "
226+
"correct directory structure.\n\n"
227+
"PAK files should be placed in one of the following locations "
228+
"within the mod:\n"
237229
"- Content/Paks/~mods/\n"
238230
"- Paks/\n"
239231
"- ~mods/\n\n"
@@ -244,7 +236,8 @@ def fullDescription(self, key: int) -> str:
244236
"Required mod directory is missing in the game folder.\n\n"
245237
"The following directory should exist:\n"
246238
"- Stalker2/Content/Paks/~mods\n\n"
247-
"This will be created automatically when you restart Mod Organizer 2."
239+
"This will be created automatically when you restart "
240+
"Mod Organizer 2."
248241
)
249242
case _:
250243
return ""

0 commit comments

Comments
 (0)