Skip to content
Snippets Groups Projects

Added perspectives and fixed get_player

Merged Edvin Bergström requested to merge replay_perspective into master
4 files
+ 11
2
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -38,6 +38,6 @@ void define_replay_unit(py::module & m)
@@ -38,6 +38,6 @@ void define_replay_unit(py::module & m)
.def_property_readonly("is_carrying_minerals", &ReplayUnit::isCarryingMinerals)
.def_property_readonly("is_carrying_minerals", &ReplayUnit::isCarryingMinerals)
.def("__hash__", [](const ReplayUnit & unit) { return std::hash<const sc2::Unit *>{}(unit.getUnitPtr()); })
.def("__hash__", [](const ReplayUnit & unit) { return std::hash<const sc2::Unit *>{}(unit.getUnitPtr()); })
.def(py::self == py::self)
.def(py::self == py::self)
.def("__repr__", [](const ReplayUnit & unit) { return "<Unit of type: '" + unit.getTypeName() + "'>"; })
.def("__repr__", [](const ReplayUnit & unit) { return "<Unit of type: '" + unit.getTypeName() +" player: " + std::to_string(unit.getPlayer()) +">"; })
;
;
}
}
Loading