diff --git a/docs/idabot.rst b/docs/idabot.rst index 31864ba8000e44e0002e2c8bcaef839057a34066..2a3b0c0d2f9c1339bb38c7ea32f358afc5f71ae9 100644 --- a/docs/idabot.rst +++ b/docs/idabot.rst @@ -55,6 +55,10 @@ IDABot Returns the players race, useful if you play Race.Random + .. method:: IDABot.send_chat(self, message) + + Sends the string 'message' to the game chat + Attributes: .. autoattribute:: minerals diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp index bfdb607e9a57e36cc81e077afd9ef44b088957a0..dbe34443ee9bd2153bd6cb1cb395134ae9425ffb 100644 --- a/python-api-src/library.cpp +++ b/python-api-src/library.cpp @@ -74,7 +74,7 @@ PYBIND11_MODULE(library, m) .def(py::init()) .def("on_game_start", &IDABot::OnGameStart) .def("on_step", &IDABot::OnStep) - .def("send_chat", &IDABot::SendChat, "Send a message to the game chat", "message"_a) + .def("send_chat", &IDABot::SendChat, "Send a message to the game chat", "message"_a) .def("get_all_units", &IDABot::GetAllUnits, "Returns a list of all units") .def("get_my_units", &IDABot::GetMyUnits, "Returns a list of all units beloning to the player") .def("get_player_race", &IDABot::GetPlayerRace) diff --git a/src/IDABot.cpp b/src/IDABot.cpp index 9c182ae62d7b09a6b6f93bb26f15b2ecf16b2c8c..d0908f789cb42ab5675a0028889085a4918d79bd 100644 --- a/src/IDABot.cpp +++ b/src/IDABot.cpp @@ -202,7 +202,7 @@ BuildingPlacer & IDABot::GetBuildingPlacer() void IDABot::SendChat(const std::string & message) { - Actions()->SendChat(message); + Actions()->SendChat(message); } const TypeData & IDABot::Data(const UnitType & type) const diff --git a/src/IDABot.h b/src/IDABot.h index ba86ce6c40b6ff6e3eb0fbd8af5e52ffbfe6fb18..a1567ac9f75b75b6d5268cb3c4f3e372e8eac23e 100644 --- a/src/IDABot.h +++ b/src/IDABot.h @@ -46,7 +46,7 @@ public: CCPosition GetStartLocation() const; BuildingPlacer & GetBuildingPlacer(); - void SendChat(const std::string & message); + void SendChat(const std::string & message); int GetCurrentFrame() const; int GetMinerals() const;