aboutsummaryrefslogtreecommitdiff
path: root/libs/basic_games/games/game_starsector.py
blob: 2dc27d91567926045b0162b6b3f2caf14d233608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from pathlib import Path

from PyQt6.QtCore import QDir

import mobase

from ..basic_game import BasicGame, BasicGameSaveGame


class Starsector(BasicGame):
    Name = "Starsector Support Plugin"
    Author = "ddbb07"
    Version = "1.0.1"

    GameName = "Starsector"
    GameShortName = "starsector"
    GameNexusName = "starsector"
    GameBinary = "starsector.exe"
    GameDataPath = "mods"
    GameSavesDirectory = "%GAME_PATH%/saves"
    GameSupportURL = (
        r"https://github.com/ModOrganizer2/modorganizer-basic_games/wiki/"
        "Game:-Starsector"
    )

    def listSaves(self, folder: QDir) -> list[mobase.ISaveGame]:
        return [
            BasicGameSaveGame(path)
            for path in Path(folder.absolutePath()).glob("save_*")
        ]