aboutsummaryrefslogtreecommitdiff
path: root/libs/basic_games/games/game_thug2.py
blob: 389e204ee7f23c4e7e8f3630df57f7eb63a03edc (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
# -*- encoding: utf-8 -*-

import os

from PyQt6.QtCore import QDir, QFileInfo

import mobase

from ..basic_game import BasicGame


class THPS4Game(BasicGame):
    Name = "Tony Hawk's Underground 2 Support Plugin"
    Author = "uwx"
    Version = "1.0.0"

    GameName = "Tony Hawk's Underground 2"
    GameShortName = "thug2"
    GameBinary = "THUG2.exe"
    GameDataPath = "Data"

    def executables(self):
        return [
            mobase.ExecutableInfo(
                "Tony Hawk's Underground 2",
                QFileInfo(self.gameDirectory().absoluteFilePath(self.binaryName())),
            ),
            mobase.ExecutableInfo(
                "Tony Hawk's Underground 2 Launcher",
                QFileInfo(self.gameDirectory().absoluteFilePath("../Launcher.exe")),
            ).withWorkingDirectory(
                QDir(QDir.cleanPath(self.gameDirectory().absoluteFilePath("..")))
            ),
            mobase.ExecutableInfo(
                "Tony Hawk's Underground 2 (ClownJob'd)",
                QFileInfo(self.gameDirectory().absoluteFilePath("THUGTWO.exe")),
            ),
            mobase.ExecutableInfo(
                "THUG Pro Launcher",
                QFileInfo(
                    QDir(os.getenv("LOCALAPPDATA")).absoluteFilePath(
                        "THUG Pro/THUGProLauncher.exe"
                    )
                ),
            ),
            mobase.ExecutableInfo(
                "THUG Pro",
                QFileInfo(
                    QDir(os.getenv("LOCALAPPDATA")).absoluteFilePath(
                        "THUG Pro/THUGPro.exe"
                    )
                ),
            ),
        ]