diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 02:39:48 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-12 02:39:48 -0500 |
| commit | e985dc340097831d4e5625941bded217abaa57b8 (patch) | |
| tree | c06583dad4099a24199bb59c9e6b65487ae940d5 /libs | |
| parent | c7cffa225b3c6e64b972eb68d536b76ac7e24717 (diff) | |
Add Stalker 2: Heart of Chornobyl plugin
Vendored BasicGame plugin from upstream modorganizer-basic_games.
Auto-moves loose *.pak/*.utoc/*.ucas files under Content/Paks/~mods/
on install.
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/basic_games/games/game_stalker2heartofchornobyl.py | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/libs/basic_games/games/game_stalker2heartofchornobyl.py b/libs/basic_games/games/game_stalker2heartofchornobyl.py new file mode 100644 index 0000000..c6d4abb --- /dev/null +++ b/libs/basic_games/games/game_stalker2heartofchornobyl.py @@ -0,0 +1,52 @@ +from typing import List, Tuple +from PyQt6.QtCore import QFileInfo +import mobase +from ..basic_game import BasicGame +from ..basic_features import BasicModDataChecker, GlobPatterns, BasicLocalSavegames + + +class S2HoCGame(BasicGame, mobase.IPluginFileMapper): + + Name = "Stalker 2: Heart of Chornobyl Plugin" + Author = "Archon" + Version = "0.1.0a" + GameName = "Stalker 2: Heart of Chornobyl" + GameShortName = "stalker2heartofchornobyl" + GameNexusName = "stalker2heartofchornobyl" + GameDocumentsDirectory = "%USERPROFILE%/AppData/Local/Stalker2" + GameSavesDirectory = "%GAME_DOCUMENTS%/Saved/Steam/SaveGames/Data" + GameSaveExtension = "sav" + GameNexusId = 6944 + GameSteamId = 1643320 + GameGogId = 1529799785 + GameBinary = "Stalker2.exe" + GameDataPath = "%GAME_PATH%/Stalker2" + GameIniFiles = [ + "%GAME_DOCUMENTS%/Saved/Config/Windows/Game.ini", + "%GAME_DOCUMENTS%/Saved/Config/Windows/GameUserSettings.ini", + "%GAME_DOCUMENTS%/Saved/Config/Windows/Engine.ini" + ] + + def __init__(self): + super().__init__() + mobase.IPluginFileMapper.__init__(self) + + def init(self, organizer: mobase.IOrganizer) -> bool: + super().init(organizer) + if hasattr(self, '_featureMap'): + self._featureMap[mobase.ModDataChecker] = S2HoCModDataChecker() + else: + self._register_feature(S2HoCModDataChecker()) + return True + + def mappings(self) -> list[mobase.Mapping]: + return [] + +class S2HoCModDataChecker(BasicModDataChecker): + def __init__(self, patterns: GlobPatterns = GlobPatterns()): + super().__init__( + GlobPatterns( + valid=["Content"], + move={"*.pak": "Content/Paks/~mods/", "*.utoc": "Content/Paks/~mods/", "*.ucas": "Content/Paks/~mods/"}, + ).merge(patterns), + ) |
