From 3f02f975aa7ca6a5438fdfd48fa0fbda03168b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 14 Jun 2020 10:52:45 +0200 Subject: [PATCH] Add missing bindings for executableForcedLoads and fix ExecutableInfo. --- src/runner/pythonrunner.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index 53e914e..a61d780 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -195,10 +195,10 @@ BOOST_PYTHON_MODULE(mobase) bpy::class_("PluginSetting", bpy::init()); bpy::class_("ExecutableInfo", bpy::init()) - .def("withArgument", &ExecutableInfo::withArgument, bpy::return_value_policy()) - .def("withWorkingDirectory", &ExecutableInfo::withWorkingDirectory, bpy::return_value_policy()) - .def("withSteamAppId", &ExecutableInfo::withSteamAppId, bpy::return_value_policy()) - .def("asCustom", &ExecutableInfo::asCustom, bpy::return_value_policy()) + .def("withArgument", &ExecutableInfo::withArgument, bpy::return_self<>()) + .def("withWorkingDirectory", &ExecutableInfo::withWorkingDirectory, bpy::return_self<>()) + .def("withSteamAppId", &ExecutableInfo::withSteamAppId, bpy::return_self<>()) + .def("asCustom", &ExecutableInfo::asCustom, bpy::return_self<>()) .def("isValid", &ExecutableInfo::isValid) .def("title", &ExecutableInfo::title) .def("binary", &ExecutableInfo::binary) @@ -208,6 +208,15 @@ BOOST_PYTHON_MODULE(mobase) .def("isCustom", &ExecutableInfo::isCustom) ; + bpy::class_("ExecutableForcedLoadSetting", bpy::init()) + .def("withForced", &ExecutableForcedLoadSetting::withForced, bpy::return_self<>()) + .def("withEnabled", &ExecutableForcedLoadSetting::withEnabled, bpy::return_self<>()) + .def("enabled", &ExecutableForcedLoadSetting::enabled) + .def("forced", &ExecutableForcedLoadSetting::forced) + .def("library", &ExecutableForcedLoadSetting::library) + .def("process", &ExecutableForcedLoadSetting::process) + ; + bpy::class_, ISaveGameWrapper*, boost::noncopyable>("ISaveGame") .def("getFilename", bpy::pure_virtual(&ISaveGame::getFilename)) .def("getCreationTime", bpy::pure_virtual(&ISaveGame::getCreationTime)) @@ -685,6 +694,7 @@ BOOST_PYTHON_MODULE(mobase) .def("documentsDirectory", bpy::pure_virtual(&MOBase::IPluginGame::documentsDirectory)) .def("savesDirectory", bpy::pure_virtual(&MOBase::IPluginGame::savesDirectory)) .def("executables", bpy::pure_virtual(&MOBase::IPluginGame::executables)) + .def("executableForcedLoads", bpy::pure_virtual(&MOBase::IPluginGame::executableForcedLoads)) .def("steamAPPId", bpy::pure_virtual(&MOBase::IPluginGame::steamAPPId)) .def("primaryPlugins", bpy::pure_virtual(&MOBase::IPluginGame::primaryPlugins)) .def("gameVariants", bpy::pure_virtual(&MOBase::IPluginGame::gameVariants))