mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Update following ModDataChecker change.
This commit is contained in:
@@ -102,8 +102,12 @@ bool LocalSavegamesWrapper::prepareProfile(MOBase::IProfile * profile)
|
||||
/////////////////////////////
|
||||
/// ModDataChecker Wrapper
|
||||
|
||||
bool ModDataCheckerWrapper::dataLooksValid(std::shared_ptr<const MOBase::IFileTree> fileTree) const {
|
||||
return basicWrapperFunctionImplementation<bool>(this, "dataLooksValid", fileTree);
|
||||
ModDataChecker::CheckReturn ModDataCheckerWrapper::dataLooksValid(std::shared_ptr<const MOBase::IFileTree> fileTree) const {
|
||||
return basicWrapperFunctionImplementation<CheckReturn>(this, "dataLooksValid", fileTree);
|
||||
}
|
||||
|
||||
std::shared_ptr<MOBase::IFileTree> ModDataCheckerWrapper::fix(std::shared_ptr<MOBase::IFileTree> fileTree) const {
|
||||
return basicWrapperFunctionImplementationWithDefault<std::shared_ptr<MOBase::IFileTree>>(this, [](auto&&... args) { return nullptr; }, "fix", fileTree);
|
||||
}
|
||||
|
||||
/// end ModDataChecker Wrapper
|
||||
@@ -288,9 +292,22 @@ void registerGameFeaturesPythonConverters()
|
||||
.def("prepareProfile", bpy::pure_virtual(&LocalSavegames::prepareProfile))
|
||||
;
|
||||
|
||||
bpy::class_<ModDataCheckerWrapper, boost::noncopyable>("ModDataChecker")
|
||||
auto modDataCheckerClass = bpy::class_<ModDataCheckerWrapper, boost::noncopyable>("ModDataChecker");
|
||||
{
|
||||
bpy::scope scope = modDataCheckerClass;
|
||||
|
||||
bpy::enum_<ModDataChecker::CheckReturn>("CheckReturn")
|
||||
.value("INVALID", ModDataChecker::CheckReturn::INVALID)
|
||||
.value("FIXABLE", ModDataChecker::CheckReturn::FIXABLE)
|
||||
.value("VALID", ModDataChecker::CheckReturn::VALID)
|
||||
.export_values()
|
||||
;
|
||||
|
||||
modDataCheckerClass
|
||||
.def("dataLooksValid", bpy::pure_virtual(&ModDataChecker::dataLooksValid))
|
||||
.def("dataLooksValid", bpy::pure_virtual(&ModDataChecker::dataLooksValid))
|
||||
;
|
||||
}
|
||||
|
||||
{
|
||||
bpy::scope scope = bpy::class_<ModDataContentWrapper, boost::noncopyable>("ModDataContent")
|
||||
|
||||
@@ -85,7 +85,8 @@ public:
|
||||
static constexpr const char* className = "ModDataCheckerWrapper";
|
||||
using boost::python::wrapper<ModDataChecker>::get_override;
|
||||
|
||||
virtual bool dataLooksValid(std::shared_ptr<const MOBase::IFileTree> fileTree) const override;
|
||||
virtual CheckReturn dataLooksValid(std::shared_ptr<const MOBase::IFileTree> fileTree) const override;
|
||||
virtual std::shared_ptr<MOBase::IFileTree> fix(std::shared_ptr<MOBase::IFileTree> fileTree) const override;
|
||||
};
|
||||
|
||||
class ModDataContentWrapper : public ModDataContent, public boost::python::wrapper<ModDataContent>
|
||||
|
||||
Reference in New Issue
Block a user