diff --git a/README.md b/README.md index 704d8b8..d1cbc8f 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ You can rename `modorganizer-basic_games-xxx` to whatever you want (e.g., `basic | Game | Author | File | Extras | |------|--------|------|--------| | The Binding of Isaac: Rebirth — [STEAM](https://store.steampowered.com/app/250900/The_Binding_of_Isaac_Rebirth/) |[EzioTheDeadPoet](https://github.com/EzioTheDeadPoet)|[game_thebindingofisaacrebirth.py](games/game_thebindingofisaacrebirth.py)|| +| Control — [STEAM](https://store.steampowered.com/app/870780/Control_Ultimate_Edition/) / [GOG](https://www.gog.com/game/control_ultimate_edition) / [EGS](https://www.epicgames.com/store/p/control) | [Zash](https://github.com/ZashIn) | [game_control.py](games/game_control.py) | | | Darkest Dungeon — [GOG](https://www.gog.com/game/darkest_dungeon) / [STEAM](https://store.steampowered.com/app/262060/Darkest_Dungeon/) | [erri120](https://github.com/erri120) | [game_darkestdungeon.py](games/game_darkestdungeon.py) | | | Dark Messiah of Might & Magic — [STEAM](https://store.steampowered.com/app/2100/Dark_Messiah_of_Might__Magic/) | [Holt59](https://github.com/holt59/) | [game_darkmessiahofmightandmagic.py](games/game_darkmessiahofmightandmagic.py) | | | Dark Souls — [STEAM](https://store.steampowered.com/app/211420/DARK_SOULS_Prepare_To_Die_Edition/) | [Holt59](https://github.com/holt59/) | [game_darksouls.py](games/game_darkestdungeon.py) | | diff --git a/games/game_control.py b/games/game_control.py new file mode 100644 index 0000000..8e283a0 --- /dev/null +++ b/games/game_control.py @@ -0,0 +1,64 @@ +# -*- encoding: utf-8 -*- + +from __future__ import annotations + +import mobase +from PyQt5.QtCore import QFileInfo + +from ..basic_game import BasicGame + + +class ControlGame(BasicGame): + + Name = "Control Support Plugin" + Author = "Zash" + Version = "1.0.0" + + GameName = "Control" + GameShortName = "control" + GameNexusId = 2936 + GameSteamId = 870780 + GameGogId = 2049187585 + GameBinary = "Control.exe" + GameDataPath = "" + + def executables(self): + return [ + mobase.ExecutableInfo( + "Control (Launcher)", + QFileInfo( + self.gameDirectory(), + self.binaryName(), + ), + ), + mobase.ExecutableInfo( + "Control DX11", + QFileInfo( + self.gameDirectory(), + "Control_DX11.exe", + ), + ), + mobase.ExecutableInfo( + "Control DX12", + QFileInfo( + self.gameDirectory(), + "Control_DX12.exe", + ), + ), + ] + + def executableForcedLoads(self) -> list[mobase.ExecutableForcedLoadSetting]: + try: + efls = super().executableForcedLoads() + except AttributeError: + efls = [] + + libraries = ["iphlpapi.dll", "xinput1_4.dll"] + efls.extend( + mobase.ExecutableForcedLoadSetting( + exe.binary().fileName(), lib + ).withEnabled(True) + for lib in libraries + for exe in self.executables() + ) + return efls