Add basic support for Control with forced load lib for Loose Files Loader and Control Plugin Loader

This commit is contained in:
Zash
2022-04-12 00:11:43 +02:00
parent 16939ac6c7
commit 14e53a978b
2 changed files with 65 additions and 0 deletions
+1
View File
@@ -49,6 +49,7 @@ You can rename `modorganizer-basic_games-xxx` to whatever you want (e.g., `basic
|------|--------|------|--------|
| 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)|<ul><li>profile specific ini file</li></ul>|
| 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) | <ul><li>save slot parsing</li><li>mod data checker</li></ul> |
| 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) | |
| 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) | <ul><li>save game preview</li></ul> |
| 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) | |
| Divinity: Original Sin (Classic) — [STEAM](https://store.steampowered.com/app/230230/Divinity_Original_Sin_Classic/) | [LostDragonist](https://github.com/LostDragonist/) | [game_divinityoriginalsin.py](games/game_divinityoriginalsin.py) | <ul><li>save game preview</li></ul> |
+64
View File
@@ -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