From cad58a248f62930a326e16cd8294f585183553f9 Mon Sep 17 00:00:00 2001 From: Moritz Heinemann Date: Fri, 16 Feb 2024 14:13:30 +0100 Subject: [PATCH] add PerLevelData and PersistentAndRuntimeData bindings --- libsavepy/GameTypes/Save.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libsavepy/GameTypes/Save.cpp b/libsavepy/GameTypes/Save.cpp index c7647399..d968661d 100644 --- a/libsavepy/GameTypes/Save.cpp +++ b/libsavepy/GameTypes/Save.cpp @@ -32,6 +32,18 @@ void init_GameTypes_Save(py::module_& m) { .def("parentReference", &s::SaveActor::parentReference) .def("childReferences", &s::SaveActor::childReferences); + py::class_(m, "PerLevelData") + .def(py::init<>()) + .def_readwrite("level_name", &s::SaveGame::PerLevelData::level_name) + .def_readwrite("save_objects", &s::SaveGame::PerLevelData::save_objects) + .def_readwrite("destroyed_actors_TOC", &s::SaveGame::PerLevelData::destroyed_actors_TOC) + .def_readwrite("destroyed_actors", &s::SaveGame::PerLevelData::destroyed_actors); + + py::class_(m, "PersistentAndRuntimeData") + .def(py::init<>()) + .def_readwrite("save_objects", &s::SaveGame::PersistentAndRuntimeData::save_objects) + .def_readwrite("destroyed_actors", &s::SaveGame::PersistentAndRuntimeData::destroyed_actors_TOC); + py::class_(m, "SaveGame") .def(py::init()) .def("save", &s::SaveGame::save)