aboutsummaryrefslogtreecommitdiff
path: root/libs/basic_games/games/game_control.py
blob: 2662410b797d86d273fd00d02eadad9e420013ee (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from __future__ import annotations

from PyQt6.QtCore import QFileInfo

import mobase

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
    GameEpicId = "calluna"
    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