88
99from ..basic_game import BasicGame
1010
11- try :
12- from PyQt6 .QtCore import QDir , QFileInfo
13- except :
14- from PyQt5 .QtCore import QDir , QFileInfo
15-
11+ from PyQt6 .QtCore import QDir , QFileInfo
1612
1713class RoadToVostokModDataChecker (mobase .ModDataChecker ):
1814 def __init__ (self , organizer : mobase .IOrganizer ):
1915 super ().__init__ ()
2016 self .organizer : mobase .IOrganizer = organizer
2117
2218 def dataLooksValid (self , filetree : mobase .IFileTree ) -> mobase .ModDataChecker .CheckReturn :
23-
19+
2420 if filetree .exists ("mods" , mobase .IFileTree .DIRECTORY ) and not filetree .exists ("mod.txt" , mobase .IFileTree .FILE ):
2521 return mobase .ModDataChecker .VALID
2622 for e in filetree :
@@ -31,7 +27,7 @@ def dataLooksValid(self, filetree: mobase.IFileTree) -> mobase.ModDataChecker.Ch
3127 def fix (self , filetree : mobase .IFileTree ) -> mobase .IFileTree :
3228 GameModsPath = self .organizer .managedGame ().GameModsPath + "/"
3329 treefixed = 0
34-
30+
3531 for branch in filetree :
3632 mod_name = filetree .name ()
3733 if mod_name == "" :
@@ -41,14 +37,14 @@ def fix(self, filetree: mobase.IFileTree) -> mobase.IFileTree:
4137 os .makedirs (os .path .join (mod_path , GameModsPath ), exist_ok = True )
4238 shutil .move (os .path .join (mod_path , branch .name ()), os .path .join (mod_path , GameModsPath , branch .name ()))
4339 treefixed = 1
44-
40+
4541 if treefixed == 0 :
4642 return None
4743 return filetree
4844
4945
5046class RoadToVostokGame (BasicGame ):
51-
47+
5248 Name = "Road to Vostok Support Plugin"
5349 Author = "modworkshop"
5450 Version = "1"
@@ -86,4 +82,4 @@ def initializeProfile(self, directory: QDir, settings: mobase.ProfileSetting):
8682 modsPath = self .dataDirectory ().absolutePath ()
8783 if not os .path .exists (modsPath ):
8884 os .mkdir (modsPath )
89- super ().initializeProfile (directory , settings )
85+ super ().initializeProfile (directory , settings )
0 commit comments