diff --git a/python-api-src/lib_unittype.cpp b/python-api-src/lib_unittype.cpp index 704e9d9e7c9f4b395652ec09f034bc875b817aa1..4dd896a9d0c7ec107733750749ce18aa678f9e18 100644 --- a/python-api-src/lib_unittype.cpp +++ b/python-api-src/lib_unittype.cpp @@ -8,7 +8,7 @@ void define_unittype(py::module & m) .def(py::init<const sc2::UnitTypeID &, IDABot &>()) .def("is_type_id", &UnitType::is, "Check if UnitType is UnitTypeID") .def(py::self == py::self) - .def_property_readonly("type_id", &UnitType::getAPIUnitType) + .def_property_readonly("unit_typeid", [](UnitType & unit_type) { return static_cast<sc2::UNIT_TYPEID>(unit_type.getAPIUnitType()); }) .def_property_readonly("name", &UnitType::getName) .def_property_readonly("race", &UnitType::getRace) .def_property_readonly("is_valid", &UnitType::isValid)