Skip to content

Commit 592b10d

Browse files
[pre-commit.ci] Auto fixes from pre-commit.com hooks.
1 parent ff633cd commit 592b10d

5 files changed

Lines changed: 24 additions & 3 deletions

File tree

games/baldursgate3/bg3_data_archives.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import mobase
2+
3+
24
class BG3DataArchives(mobase.DataArchives):
35
def addArchive(self, profile, index, name):
46
pass

games/baldursgate3/bg3_data_content.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ def getContentsFor(self, filetree: mobase.IFileTree) -> list[int]:
4747
case _:
4848
for e in entry:
4949
match e.name().casefold():
50-
case "Mods" | "Localization" | "ScriptExtender" | "Public" | "Generated":
50+
case (
51+
"Mods"
52+
| "Localization"
53+
| "ScriptExtender"
54+
| "Public"
55+
| "Generated"
56+
):
5157
contents.add(Content.WORKSPACE)
5258
break
5359
return list(contents)

games/baldursgate3/bg3_game_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import mobase
22

3+
34
class BG3GamePlugin(mobase.GamePlugins):
45
def getLoadOrder(self):
56
pass

games/baldursgate3/bg3_script_extender.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
import pathlib
2+
23
import mobase
34

5+
46
class BG3ScriptExtender(mobase.ScriptExtender):
57
def __init__(self, game: mobase.IPluginGame):
68
super().__init__()
79
self._game = game
10+
811
def loaderName(self) -> str:
912
return "DWrite.dll"
13+
1014
def loaderPath(self) -> str:
11-
return str(pathlib.Path(self._game.gameDirectory().absolutePath()) / "bin" / self.loaderName())
15+
return str(
16+
pathlib.Path(self._game.gameDirectory().absolutePath())
17+
/ "bin"
18+
/ self.loaderName()
19+
)
20+
1221
def isInstalled(self) -> bool:
1322
return pathlib.Path(self.loaderPath()).exists()
23+
1424
def getExtenderVersion(self) -> str:
1525
return mobase.getFileVersion(self.loaderPath())
26+
1627
def getArch(self) -> int:
1728
return 0x8664 if self.isInstalled() else 0x0
29+
1830
def binaryName(self):
1931
return ""
2032

games/game_baldursgate3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self):
5353

5454
def init(self, organizer: mobase.IOrganizer) -> bool:
5555
super().init(organizer)
56-
from baldursgate3 import bg3_data_checker, bg3_utils, bg3_data_content
56+
from baldursgate3 import bg3_data_checker, bg3_data_content, bg3_utils
5757

5858
self._utils = bg3_utils.BG3Utils(organizer, self.name())
5959
self._register_feature(

0 commit comments

Comments
 (0)