mirror of
https://github.com/ModOrganizer2/modorganizer-basic_games.git
synced 2026-07-27 14:07:29 -07:00
Merge pull request #31 from Holt59/master
Fix savegame widget position and add Cyberpunk 2077.
This commit is contained in:
@@ -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
|
||||
run: tox -e py38-lint
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user