diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/basic_games/games/game_darkmessiahofmightandmagic.py | |
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem,
Proton/umu-run integration, and Flatpak packaging.
Key features:
- FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak)
- Proton/GE-Proton/umu-run launcher with env var forwarding
- Flatpak support (sandbox-aware VFS, NXM handler, umu-run)
- Wine prefix management UI
- Case-insensitive path resolution for Linux filesystems
- QSettings-safe INI handling (avoids Bethesda INI corruption)
- Portable instance support with auto-generated launcher scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/basic_games/games/game_darkmessiahofmightandmagic.py')
| -rw-r--r-- | libs/basic_games/games/game_darkmessiahofmightandmagic.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libs/basic_games/games/game_darkmessiahofmightandmagic.py b/libs/basic_games/games/game_darkmessiahofmightandmagic.py new file mode 100644 index 0000000..ed3fbcd --- /dev/null +++ b/libs/basic_games/games/game_darkmessiahofmightandmagic.py @@ -0,0 +1,48 @@ +import struct +from pathlib import Path + +from PyQt6.QtGui import QImage + +import mobase + +from ..basic_features import BasicGameSaveGameInfo +from ..basic_game import BasicGame + + +class DarkMessiahOfMightAndMagicGame(BasicGame): + Name = "Dark Messiah of Might and Magic Support Plugin" + Author = "Holt59" + Version = "0.1.0" + + GameName = "Dark Messiah of Might & Magic" + GameShortName = "darkmessiahofmightandmagic" + GameNexusName = "darkmessiahofmightandmagic" + GameNexusId = 628 + GameSteamId = 2100 + GameBinary = "mm.exe" + GameDataPath = "mm" + GameSupportURL = ( + r"https://github.com/ModOrganizer2/modorganizer-basic_games/wiki/" + "Game:-Dark-Messiah-of-Might-&-Magic" + ) + + GameDocumentsDirectory = "%GAME_PATH%/mm" + GameSavesDirectory = "%GAME_PATH%/mm/SAVE" + GameSaveExtension = "sav" + + def _read_save_tga(self, filepath: Path) -> QImage | None: + # Qt TGA reader does not work for TGA, I hope that all files + # have the same format: + with open( + filepath.parent.joinpath(filepath.name.replace(".sav", ".tga")), "rb" + ) as fp: + data = fp.read() + _, _, w, h, bpp, _ = struct.unpack("<HHHHBB", data[8:18]) + if bpp != 24: + return None + return QImage(data[18:], w, h, QImage.Format.Format_RGB888) + + def init(self, organizer: mobase.IOrganizer): + super().init(organizer) + self._register_feature(BasicGameSaveGameInfo(self._read_save_tga)) + return True |
