From 3893c70c88584e30d514532ed7551e9b630475f2 Mon Sep 17 00:00:00 2001
From: Ludvig Fors <ludfo119@student.liu.se>
Date: Fri, 22 Nov 2019 15:34:11 +0100
Subject: [PATCH] Changed tabs to 4 spaces. Added documentation in docs/ for
 IDAbot.send_chat

---
 docs/idabot.rst            | 4 ++++
 python-api-src/library.cpp | 2 +-
 src/IDABot.cpp             | 2 +-
 src/IDABot.h               | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/docs/idabot.rst b/docs/idabot.rst
index 31864ba80..2a3b0c0d2 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 bfdb607e9..dbe34443e 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 9c182ae62..d0908f789 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 ba86ce6c4..a1567ac9f 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;
-- 
GitLab