1- from PyQt6 .QtCore import QFileInfo
1+ from pathlib import Path
2+
3+ from PyQt6 .QtCore import QFileInfo , QDir
24
35import mobase
46
5- from ..basic_game import BasicGame
7+ from ..basic_game import BasicGame , BasicGameSaveGame
68
79
810class MountAndBladeIIModDataChecker (mobase .ModDataChecker ):
@@ -33,7 +35,7 @@ def dataLooksValid(
3335class MountAndBladeIIGame (BasicGame ):
3436 Name = "Mount & Blade II: Bannerlord"
3537 Author = "Holt59"
36- Version = "0.1.0 "
38+ Version = "0.1.1 "
3739 Description = "Adds support for Mount & Blade II: Bannerlord"
3840
3941 GameName = "Mount & Blade II: Bannerlord"
@@ -47,8 +49,7 @@ class MountAndBladeIIGame(BasicGame):
4749 GameBinary = "bin/Win64_Shipping_Client/TaleWorlds.MountAndBlade.Launcher.exe"
4850
4951 GameDocumentsDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Configs"
50- GameSaveExtension = "sav"
51- GameSavesDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Game Saves/Native"
52+ GameSavesDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Game Saves"
5253
5354 GameNexusId = 3174
5455 GameSteamId = 261550
@@ -58,6 +59,12 @@ def init(self, organizer: mobase.IOrganizer):
5859 self ._register_feature (MountAndBladeIIModDataChecker ())
5960 return True
6061
62+ def listSaves (self , folder : QDir ) -> list [mobase .ISaveGame ]:
63+ save_paths = list (Path (folder .absolutePath ()).glob ("*.sav" )) + list (
64+ Path (folder .absolutePath ()).glob ("*.sav.cleaner_backup_*" )
65+ )
66+ return [BasicGameSaveGame (path ) for path in save_paths ]
67+
6168 def executables (self ):
6269 return [
6370 mobase .ExecutableInfo (
0 commit comments