Skip to content
Snippets Groups Projects
Commit 7f11f269 authored by David Bergström's avatar David Bergström
Browse files

Fix is_constructing method (which was thought to be a property)

parent 622fbf5b
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@ void define_unit(py::module & m)
.def_property_readonly("is_burrowed", &Unit::isBurrowed)
.def_property_readonly("is_valid", &Unit::isValid)
.def_property_readonly("is_training", &Unit::isTraining)
.def_property_readonly("is_constructing", &Unit::isConstructing)
.def("stop", &Unit::stop)
.def("attack_unit", &Unit::attackUnit)
.def("attack_move", &Unit::attackMove)
......@@ -38,6 +37,7 @@ void define_unit(py::module & m)
.def("train", &Unit::train, "Train unit of type", "unit_type"_a)
.def("morph", &Unit::morph, "Morph into type of unit_type", "unit_type"_a)
.def("research", &Unit::research, "Research the given :class:`library.UPGRADE_ID`", "upgrade_id"_a)
.def("is_constructing", &Unit::isConstructing, "unit_type"_a)
.def("__hash__", [](const Unit & unit) { return std::hash<const sc2::Unit *>{}(unit.getUnitPtr()); })
.def(py::self == py::self)
.def("__repr__", [](const Unit & unit) { return "<Unit of type: '" + unit.getType().getName() + "'>"; });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment