From 34db4c7bfee0c9ba61a993f6d3063fe75a073e95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se>
Date: Thu, 19 Jul 2018 13:21:11 +0200
Subject: [PATCH] Return UNIT_TYPEID instead of type wrapper UnitTypeID

---
 python-api-src/lib_unittype.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python-api-src/lib_unittype.cpp b/python-api-src/lib_unittype.cpp
index 704e9d9..4dd896a 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)
-- 
GitLab