From a5ad5ddc9df898cffad7e7a0996051a455fc99fc Mon Sep 17 00:00:00 2001 From: tristan-iu Date: Sun, 21 Jun 2026 17:56:42 +0200 Subject: Add IPluginGame::usesVFS() game feature and python binding --- libs/plugin_python/src/mobase/wrappers/pyplugins.cpp | 1 + libs/plugin_python/src/mobase/wrappers/pyplugins.h | 4 ++++ libs/uibase/include/uibase/iplugingame.h | 13 +++++++++++++ 3 files changed, 18 insertions(+) diff --git a/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp b/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp index c744c7b..6f24438 100644 --- a/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp +++ b/libs/plugin_python/src/mobase/wrappers/pyplugins.cpp @@ -53,6 +53,7 @@ namespace mo2::python { .def("listSaves", &IPluginGame::listSaves, "folder"_a) .def("isInstalled", &IPluginGame::isInstalled) .def("isNativeLinux", &IPluginGame::isNativeLinux) + .def("usesVFS", &IPluginGame::usesVFS) .def("gameIcon", &IPluginGame::gameIcon) .def("gameDirectory", &IPluginGame::gameDirectory) .def("dataDirectory", &IPluginGame::dataDirectory) diff --git a/libs/plugin_python/src/mobase/wrappers/pyplugins.h b/libs/plugin_python/src/mobase/wrappers/pyplugins.h index 1480690..cd33e96 100644 --- a/libs/plugin_python/src/mobase/wrappers/pyplugins.h +++ b/libs/plugin_python/src/mobase/wrappers/pyplugins.h @@ -434,6 +434,10 @@ namespace mo2::python { { PYBIND11_OVERRIDE(bool, IPluginGame, isNativeLinux, ); } + bool usesVFS() const override + { + PYBIND11_OVERRIDE(bool, IPluginGame, usesVFS, ); + } QIcon gameIcon() const override { PYBIND11_OVERRIDE_PURE(QIcon, IPluginGame, gameIcon, ); diff --git a/libs/uibase/include/uibase/iplugingame.h b/libs/uibase/include/uibase/iplugingame.h index c7760f1..86ed7b0 100644 --- a/libs/uibase/include/uibase/iplugingame.h +++ b/libs/uibase/include/uibase/iplugingame.h @@ -151,6 +151,19 @@ public: */ virtual bool isNativeLinux() const { return false; } + /** + * this function may be called before init() + * + * @return true if Fluorine should mount its FUSE VFS over the game's data + * directory for this game (the default). Return false for games that + * manage their own virtual file system — e.g. OpenMW, which reads mods + * from data= entries in openmw.cfg — so Fluorine skips the mount + * entirely and lets the engine resolve its own load order. This is + * distinct from isNativeLinux(): a native Linux game (e.g. Stardew + * Valley) can still rely on the VFS to expose its mods. + */ + virtual bool usesVFS() const { return true; } + /** * this function may be called before init() * -- cgit v1.3.1