diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/basic_games/games/game_kerbalspaceprogram.py | |
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem,
Proton/umu-run integration, and Flatpak packaging.
Key features:
- FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak)
- Proton/GE-Proton/umu-run launcher with env var forwarding
- Flatpak support (sandbox-aware VFS, NXM handler, umu-run)
- Wine prefix management UI
- Case-insensitive path resolution for Linux filesystems
- QSettings-safe INI handling (avoids Bethesda INI corruption)
- Portable instance support with auto-generated launcher scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/basic_games/games/game_kerbalspaceprogram.py')
| -rw-r--r-- | libs/basic_games/games/game_kerbalspaceprogram.py | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libs/basic_games/games/game_kerbalspaceprogram.py b/libs/basic_games/games/game_kerbalspaceprogram.py new file mode 100644 index 0000000..fec834f --- /dev/null +++ b/libs/basic_games/games/game_kerbalspaceprogram.py @@ -0,0 +1,61 @@ +from pathlib import Path + +from PyQt6.QtCore import QDir + +import mobase + +from ..basic_features import BasicGameSaveGameInfo +from ..basic_features.basic_save_game_info import BasicGameSaveGame +from ..basic_game import BasicGame + + +class KerbalSpaceProgramSaveGame(BasicGameSaveGame): + def allFiles(self): + files = [super().getFilepath()] + banner = self._filepath.joinpath("banners").joinpath(f"${self.getName()}.png") + if banner.exists(): + files.append(banner.as_posix()) + return files + + def getName(self): + return self._filepath.stem + + def getSaveGroupIdentifier(self): + return self._filepath.parent.name + + +class KerbalSpaceProgramGame(BasicGame): + Name = "Kerbal Space Program Support Plugin" + Author = "LaughingHyena" + Version = "1.0.0" + + GameName = "Kerbal Space Program" + GameShortName = "kerbalspaceprogram" + GameNexusName = "kerbalspaceprogram" + GameSteamId = [220200, 283740, 982970] + GameBinary = "KSP_x64.exe" + GameDataPath = "GameData" + GameSavesDirectory = "%GAME_PATH%/saves" + GameSaveExtension = "sfs" + GameSupportURL = ( + r"https://github.com/ModOrganizer2/modorganizer-basic_games/wiki/" + "Game:-Kerbal-Space-Program" + ) + + def init(self, organizer: mobase.IOrganizer): + super().init(organizer) + self._register_feature( + BasicGameSaveGameInfo( + lambda s: str( + Path(s).parent.joinpath("banners").joinpath(f"{Path(s).stem}.png") + ) + ) + ) + return True + + def listSaves(self, folder: QDir) -> list[mobase.ISaveGame]: + ext = self._mappings.savegameExtension.get() + return [ + KerbalSpaceProgramSaveGame(path) + for path in Path(folder.absolutePath()).glob(f"*/*.{ext}") + ] |
