diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 58045f5..7451134 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v1 + with: + path: basic_games - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: @@ -21,4 +23,4 @@ jobs: python -m pip install --upgrade pip pip install tox - name: Test with tox - run: tox -e py38-lint \ No newline at end of file + run: tox -e py38-lint diff --git a/basic_features/basic_save_game_info.py b/basic_features/basic_save_game_info.py index af12df4..d28d288 100644 --- a/basic_features/basic_save_game_info.py +++ b/basic_features/basic_save_game_info.py @@ -52,9 +52,11 @@ class BasicGameSaveGameInfoWidget(mobase.ISaveGameInfoWidget): self.setAutoFillBackground(True) self.setPalette(palette) + self.setWindowFlags(Qt.ToolTip | Qt.BypassGraphicsProxyWidget) # type: ignore + def setSave(self, save: mobase.ISaveGame): # Resize the label to (0, 0) to hide it: - self._label.resize(0, 0) + self.resize(0, 0) # Retrieve the pixmap: value = self._get_preview(save.getFilepath()) @@ -96,9 +98,9 @@ class BasicGameSaveGameInfo(mobase.SaveGameInfo): self._savegame_class = savegame_class def getSaveGameInfo(self, filename: str): - return self._savegame_class(filename) + return self._savegame_class(Path(filename)) - def getMissingAssets(self, filename: str): + def getMissingAssets(self, save: mobase.ISaveGame): return {} def getSaveGameWidget(self, parent=None): diff --git a/games/game_cyberpunk2077.py b/games/game_cyberpunk2077.py new file mode 100644 index 0000000..7e445fd --- /dev/null +++ b/games/game_cyberpunk2077.py @@ -0,0 +1,18 @@ +from ..basic_game import BasicGame + + +class Cyberpunk2077Game(BasicGame): + + Name = "Cyberpunk 2077 Support Plugin" + Author = "6788" + Version = "1.0.0" + + GameName = "Cyberpunk 2077" + GameShortName = "cyberpunk2077" + GameBinary = "bin/x64/Cyberpunk2077.exe" + GameLauncher = "REDprelauncher.exe" + GameDataPath = "%GAME_PATH%" + GameDocumentsDirectory = "%USERPROFILE%/Saved Games/CD Projekt Red/Cyberpunk 2077" + GameSaveExtension = "dat" + GameSteamId = 1091500 + GameGogId = 1423049311 diff --git a/setup.cfg b/setup.cfg index b30e2c1..cdc00fb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,9 +16,13 @@ envlist = py38-lint [testenv:py38-lint] skip_install = true deps = + PyQt5-stubs + mobase-stubs black flake8 flake8-black + mypy commands = black --check --diff . flake8 . + mypy .