1- from PyQt6 .QtCore import QFileInfo
1+ from pathlib import Path
2+
3+ from PyQt6 .QtCore import QDir , QFileInfo
24
35import mobase
46
5- from ..basic_game import BasicGame
7+ from ..basic_features import BasicLocalSavegames
8+ from ..basic_game import BasicGame , BasicGameSaveGame
69
710
811class MountAndBladeIIModDataChecker (mobase .ModDataChecker ):
@@ -33,7 +36,7 @@ def dataLooksValid(
3336class MountAndBladeIIGame (BasicGame ):
3437 Name = "Mount & Blade II: Bannerlord"
3538 Author = "Holt59"
36- Version = "0.1.0 "
39+ Version = "0.1.1 "
3740 Description = "Adds support for Mount & Blade II: Bannerlord"
3841
3942 GameName = "Mount & Blade II: Bannerlord"
@@ -47,17 +50,23 @@ class MountAndBladeIIGame(BasicGame):
4750 GameBinary = "bin/Win64_Shipping_Client/TaleWorlds.MountAndBlade.Launcher.exe"
4851
4952 GameDocumentsDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Configs"
50- GameSaveExtension = "sav"
51- GameSavesDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Game Saves/Native"
53+ GameSavesDirectory = "%DOCUMENTS%/Mount and Blade II Bannerlord/Game Saves"
5254
5355 GameNexusId = 3174
5456 GameSteamId = 261550
5557
5658 def init (self , organizer : mobase .IOrganizer ):
5759 super ().init (organizer )
5860 self ._register_feature (MountAndBladeIIModDataChecker ())
61+ self ._register_feature (BasicLocalSavegames (self .savesDirectory ()))
5962 return True
6063
64+ def listSaves (self , folder : QDir ) -> list [mobase .ISaveGame ]:
65+ save_paths = list (Path (folder .absolutePath ()).glob ("*.sav" )) + list (
66+ Path (folder .absolutePath ()).glob ("*.sav.cleaner_backup_*" )
67+ )
68+ return [BasicGameSaveGame (path ) for path in save_paths ]
69+
6170 def executables (self ):
6271 return [
6372 mobase .ExecutableInfo (
0 commit comments