mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
23 lines
632 B
Python
23 lines
632 B
Python
from PyQt6.QtCore import QDir
|
|
|
|
import mobase
|
|
|
|
|
|
class BasicLocalSavegames(mobase.LocalSavegames):
|
|
def __init__(self, game_save_dir: QDir):
|
|
super().__init__()
|
|
self._game_saves_dir = game_save_dir.absolutePath()
|
|
|
|
def mappings(self, profile_save_dir: QDir):
|
|
return [
|
|
mobase.Mapping(
|
|
source=profile_save_dir.absolutePath(),
|
|
destination=self._game_saves_dir,
|
|
is_directory=True,
|
|
create_target=True,
|
|
)
|
|
]
|
|
|
|
def prepareProfile(self, profile: mobase.IProfile) -> bool:
|
|
return profile.localSavesEnabled()
|