aboutsummaryrefslogtreecommitdiff
path: root/libs/basic_games/games/oblivion_remaster/mod_data_content.py
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-11 02:37:39 -0600
commit7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch)
tree27fb39be241fdb5ac2734c574de678977d1856d0 /libs/basic_games/games/oblivion_remaster/mod_data_content.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/oblivion_remaster/mod_data_content.py')
-rw-r--r--libs/basic_games/games/oblivion_remaster/mod_data_content.py109
1 files changed, 109 insertions, 0 deletions
diff --git a/libs/basic_games/games/oblivion_remaster/mod_data_content.py b/libs/basic_games/games/oblivion_remaster/mod_data_content.py
new file mode 100644
index 0000000..2ee7e5f
--- /dev/null
+++ b/libs/basic_games/games/oblivion_remaster/mod_data_content.py
@@ -0,0 +1,109 @@
+from enum import IntEnum, auto
+
+import mobase
+
+
+class Content(IntEnum):
+ PLUGIN = auto()
+ BSA = auto()
+ PAK = auto()
+ OBSE = auto()
+ OBSE_FILES = auto()
+ MOVIE = auto()
+ UE4SS = auto()
+ MAGIC_LOADER = auto()
+ GAME_SETTINGS = auto()
+
+
+class OblivionRemasteredDataContent(mobase.ModDataContent):
+ OR_CONTENTS: list[tuple[Content, str, str, bool] | tuple[Content, str, str]] = [
+ (Content.PLUGIN, "Plugins (ESM/ESP)", ":/MO/gui/content/plugin"),
+ (Content.BSA, "Bethesda Archive", ":/MO/gui/content/bsa"),
+ (Content.PAK, "Paks", ":/MO/gui/content/geometries"),
+ (Content.OBSE, "Script Extender Plugin", ":/MO/gui/content/skse"),
+ (Content.OBSE_FILES, "Script Extender Files", "", True),
+ (Content.MOVIE, "Movies", ":/MO/gui/content/media"),
+ (Content.UE4SS, "UE4SS Mods", ":/MO/gui/content/script"),
+ (Content.MAGIC_LOADER, "Magic Loader Mod", ":/MO/gui/content/inifile"),
+ (Content.GAME_SETTINGS, "Game Settings", ":/MO/gui/content/menu"),
+ ]
+
+ def getAllContents(self) -> list[mobase.ModDataContent.Content]:
+ return [
+ mobase.ModDataContent.Content(id, name, icon, *filter_only)
+ for id, name, icon, *filter_only in self.OR_CONTENTS
+ ]
+
+ def getContentsFor(self, filetree: mobase.IFileTree) -> list[int]:
+ contents: set[int] = set()
+
+ for entry in filetree:
+ if isinstance(entry, mobase.IFileTree):
+ match entry.name().casefold():
+ case "data":
+ for data_entry in entry:
+ if data_entry.isFile():
+ match data_entry.suffix().casefold():
+ case "esm" | "esp":
+ contents.add(Content.PLUGIN)
+ case "bsa":
+ contents.add(Content.BSA)
+ case _:
+ pass
+ else:
+ match data_entry.name().casefold():
+ case "magicloader":
+ contents.add(Content.MAGIC_LOADER)
+ case _:
+ pass
+ case "obse":
+ contents.add(Content.OBSE_FILES)
+ plugins_dir = entry.find("Plugins")
+ if isinstance(plugins_dir, mobase.IFileTree):
+ for plugin_entry in plugins_dir:
+ if (
+ plugin_entry.isFile()
+ and plugin_entry.suffix().casefold() == "dll"
+ ):
+ contents.add(Content.OBSE)
+ if (
+ isinstance(plugin_entry, mobase.IFileTree)
+ and plugins_dir.name().casefold() == "gamesettings"
+ ):
+ for settings_file in plugin_entry:
+ if (
+ settings_file.isFile()
+ and settings_file.suffix().casefold()
+ == "ini"
+ ):
+ contents.add(Content.GAME_SETTINGS)
+ case "paks":
+ contents.add(Content.PAK)
+ for paks_entry in entry:
+ if isinstance(paks_entry, mobase.IFileTree):
+ if paks_entry.name().casefold() == "~mods":
+ for mods_entry in paks_entry:
+ if isinstance(mods_entry, mobase.IFileTree):
+ if (
+ "magicloader"
+ in mods_entry.name().casefold()
+ ):
+ contents.add(Content.MAGIC_LOADER)
+ break
+ if paks_entry.name().casefold() == "logicmods":
+ contents.add(Content.UE4SS)
+ case "movies":
+ contents.add(Content.MOVIE)
+ case "ue4ss":
+ contents.add(Content.UE4SS)
+ case "gamesettings":
+ for settings_file in entry:
+ if (
+ settings_file.isFile()
+ and settings_file.suffix().casefold() == "ini"
+ ):
+ contents.add(Content.GAME_SETTINGS)
+ case _:
+ pass
+
+ return list(contents)