Skip to content
Snippets Groups Projects
Commit 3893c70c authored by Ludvig Fors's avatar Ludvig Fors
Browse files

Changed tabs to 4 spaces. Added documentation in docs/ for IDAbot.send_chat

parent 054598a2
No related branches found
No related tags found
1 merge request!2Added chat functionallity making the bot able to send messages to the game...
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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;
......
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