Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLastCommand wrapped? #6

Open
RikonYu opened this issue May 30, 2018 · 3 comments
Open

getLastCommand wrapped? #6

RikonYu opened this issue May 30, 2018 · 3 comments

Comments

@RikonYu
Copy link

RikonYu commented May 30, 2018

Is unit::getLastCommand() wrapping in pybrood? It seems that I cant find this in pybrood document. Thanks.

@neumond
Copy link
Owner

neumond commented Jun 3, 2018

UnitCommand class isn't wrapped yet, so that's why getLastCommand is missing.

@RikonYu
Copy link
Author

RikonYu commented Jun 3, 2018

I added this into inner.cpp
py::class_<BWAPI::UnitCommand>(m, "UnitCommand") .def("getType",&UnitCommand::getType) .def("getUnit",&UnitCommand::getUnit) .def("getTarget",&UnitCommand::getTarget) .def("getTargetPosition",&UnitCommand::getTargetPosition) .def("getTargetTilePosition",&UnitCommand::getTargetTilePosition) .def("getUnitType",&UnitCommand::getUnitType) .def("getTechType",&UnitCommand::getTechType) .def("getUpgradeType",&UnitCommand::getUpgradeType) .def("getSlot",&UnitCommand::getSlot) .def("isQueued",&UnitCommand::isQueued);

then add
.def("getLastCommand",&UnitInterface::getLastCommand)
to Unit, at line 937.
this is sufficient for me for now.

@neumond
Copy link
Owner

neumond commented Jun 4, 2018

Looks good. I need to find some time to add UnitCommand at code generation stage, verify with your code (since you've tested this) and release new version. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants