diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index 36356f6556399c21592ede897fe34107f95fcf17..16fa386f68d2587d5d667abf1d610e259b85a16f 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -54,8 +54,8 @@ PYBIND11_MODULE(library, m) .def(py::init()) // TODO: The following 3 are CamelCased, but if the name is changed // the name used for inheritance in Pyhon stays the same. Weird. - .def("OnGameStart", &IDABot::OnGameStart) - .def("OnStep", &IDABot::OnStep) + .def("on_game_start", &IDABot::OnGameStart) + .def("on_step", &IDABot::OnStep) .def("get_all_units", &IDABot::GetAllUnits) .def("get_my_units", &IDABot::GetMyUnits) .def("get_player_race", &IDABot::GetPlayerRace) diff --git a/python-api-src/library.h b/python-api-src/library.h index 8c960ce94035a1853e6ec4436320cac1a71cc033..d6f451fffe47d7c0954ea3c0f33e0d9563f978e9 100644 --- a/python-api-src/library.h +++ b/python-api-src/library.h @@ -29,17 +29,19 @@ public: using IDABot::IDABot; void OnGameStart() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERLOAD_NAME( void, IDABot, + "on_game_start", OnGameStart ); } void OnStep() override { - PYBIND11_OVERLOAD( + PYBIND11_OVERLOAD_NAME( void, IDABot, + "on_step", OnStep ); }