[Orxonox-commit 7165] r11782 - in code/branches/Presentation_HS17_merge/src: modules/asteroids2D modules/dialog orxonox/worldentities orxonox/worldentities/pawns

landauf at orxonox.net landauf at orxonox.net
Tue Feb 20 00:09:09 CET 2018


Author: landauf
Date: 2018-02-20 00:09:09 +0100 (Tue, 20 Feb 2018)
New Revision: 11782

Modified:
   code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.cc
   code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.h
   code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.cc
   code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.h
   code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.cc
   code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.h
   code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.cc
   code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.h
   code/branches/Presentation_HS17_merge/src/modules/dialog/DialogManager.cc
   code/branches/Presentation_HS17_merge/src/modules/dialog/Question.cc
   code/branches/Presentation_HS17_merge/src/modules/dialog/Question.h
   code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.cc
   code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.h
   code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.h
Log:
tabs -> spaces

Modified: code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -89,7 +89,7 @@
 
     void Asteroids2DStone::tick(float dt)
     {
-    	SUPER(Asteroids2DStone, tick, dt);
+        SUPER(Asteroids2DStone, tick, dt);
         Vector3 pos = this->getPosition();
         Vector3 vel = this->getVelocity();
 

Modified: code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroids2D/Asteroids2DStone.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -60,8 +60,8 @@
        private:
           Asteroids2D* getGame();
           WeakPtr<Asteroids2D> game;
-       		int size;				// three sizes, 3-> two 2s, 2-> two 1s, 1-> die
-       		float width, height;	//field
+          int size; // three sizes, 3-> two 2s, 2-> two 1s, 1-> die
+          float width, height; //field
           float MAX_SPEED = 100;
           float delta = 5;
     };

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -32,50 +32,50 @@
 
 namespace orxonox{
 
-	RegisterClass(Answer);
+    RegisterClass(Answer);
 
 
-	// Constructor:
-	Answer::Answer(Context* context) : BaseObject(context) 
-	{
-	    RegisterObject(Answer);
-	}
+    // Constructor:
+    Answer::Answer(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Answer);
+    }
 
-	void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-	{
-		SUPER(Answer, XMLPort, xmlelement, mode);
+    void Answer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Answer, XMLPort, xmlelement, mode);
 
-		XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode);
-		XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode);
-		XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode);
-	}
+        XMLPortParam(Answer, "Id", setAnswerId, getAnswerId, xmlelement, mode);
+        XMLPortParam(Answer, "answer", setAnswer, getAnswer, xmlelement, mode);
+        XMLPortParam(Answer, "nextQuestionId", setNextQuestion, getNextQuestion, xmlelement,mode);
+    }
 
-	void Answer::setAnswerId(const std::string& answerId){
-		this->answerId_ = answerId;
-	}
+    void Answer::setAnswerId(const std::string& answerId){
+        this->answerId_ = answerId;
+    }
 
-	const std::string& Answer::getAnswerId() const
-	{
-		return this->answerId_;
-	}
+    const std::string& Answer::getAnswerId() const
+    {
+        return this->answerId_;
+    }
 
-	void Answer::setNextQuestion(const std::string& nextId)
-	{
-		this->nextQuestionId_ = nextId;
-	}
+    void Answer::setNextQuestion(const std::string& nextId)
+    {
+        this->nextQuestionId_ = nextId;
+    }
 
-	const std::string& Answer::getNextQuestion() const
-	{
-		return this->nextQuestionId_;
-	}
+    const std::string& Answer::getNextQuestion() const
+    {
+        return this->nextQuestionId_;
+    }
 
-	void Answer::setAnswer(const std::string& answer)
-	{
-		this->answer_ = answer;
-	}
+    void Answer::setAnswer(const std::string& answer)
+    {
+        this->answer_ = answer;
+    }
 
-	const std::string& Answer::getAnswer() const
-	{
-		return this->answer_;
-	}
-}	
+    const std::string& Answer::getAnswer() const
+    {
+        return this->answer_;
+    }
+}

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Answer.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -37,34 +37,34 @@
 
 namespace orxonox
 {
-	/**
-	@brief
+    /**
+    @brief
     class containing the pc side of the Dialog
 
     this class contains one possible text option of the pc, it's id and the id of the reaction of the npc to this answer
-	*/
+    */
 
-	class _DialogExport Answer : public BaseObject
-	{
-		public:
-			Answer(Context* context);
-			
-			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+    class _DialogExport Answer : public BaseObject
+    {
+        public:
+            Answer(Context* context);
 
-			void setAnswerId(const std::string& answerId); //xmlPort-Funktion, setzt AntwortId
-			const std::string& getAnswerId() const;	//xmlPort-Funktion,	gibt AntwortId
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-			void setNextQuestion(const std::string& nextId); //xmlPort-Funktion, um Dialog zu beenden tag benutzen der von keiner Frage benutzt wird
-			const std::string& getNextQuestion() const;	//xmlPort-Funktion, gibt Id der Folgefrage
+            void setAnswerId(const std::string& answerId); //xmlPort-Funktion, setzt AntwortId
+            const std::string& getAnswerId() const; //xmlPort-Funktion, gibt AntwortId
 
-			void setAnswer(const std::string& awns);	//xmlPort-Funktion, setzt Antworttext
-			const std::string& getAnswer() const;	//xmlPort-Funktion,	gibt Antworttext
+            void setNextQuestion(const std::string& nextId); //xmlPort-Funktion, um Dialog zu beenden tag benutzen der von keiner Frage benutzt wird
+            const std::string& getNextQuestion() const; //xmlPort-Funktion, gibt Id der Folgefrage
 
-		private:
-			std::string answerId_;	//!< id of the pc textoption	
-			std::string answer_;	//!< string with the pc text
-			std::string nextQuestionId_;	//!< id of the npc reaction to pc answer
-	};
+            void setAnswer(const std::string& awns); //xmlPort-Funktion, setzt Antworttext
+            const std::string& getAnswer() const; //xmlPort-Funktion, gibt Antworttext
+
+        private:
+            std::string answerId_;  //!< id of the pc textoption
+            std::string answer_;    //!< string with the pc text
+            std::string nextQuestionId_; //!< id of the npc reaction to pc answer
+    };
 }
 
 #endif

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -32,27 +32,27 @@
 
 namespace orxonox{
 
-	RegisterClass(AnswerId);
+    RegisterClass(AnswerId);
 
-	AnswerId::AnswerId(Context* context) : BaseObject(context)
-	{
-		RegisterObject(AnswerId);
-	}
+    AnswerId::AnswerId(Context* context) : BaseObject(context)
+    {
+        RegisterObject(AnswerId);
+    }
 
-	void AnswerId::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-	{
-		SUPER(AnswerId, XMLPort, xmlelement, mode);
+    void AnswerId::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(AnswerId, XMLPort, xmlelement, mode);
 
-		XMLPortParam(AnswerId, "Id", setId, getId, xmlelement, mode);
-	}
+        XMLPortParam(AnswerId, "Id", setId, getId, xmlelement, mode);
+    }
 
-	void AnswerId::setId(const std::string& id)
-	{
-		this->id_ = id;
-	}
-	
-	const std::string& AnswerId::getId() const
-	{
-		return this->id_;
-	}
+    void AnswerId::setId(const std::string& id)
+    {
+        this->id_ = id;
+    }
+
+    const std::string& AnswerId::getId() const
+    {
+        return this->id_;
+    }
 }

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/AnswerId.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -38,25 +38,25 @@
 
 namespace orxonox{
 
-	/**
-	@brief
+    /**
+    @brief
     container class for answerids in xml
 
-	*/
+    */
 
-	class _DialogExport AnswerId : public BaseObject
-	{
-		public:
-			AnswerId(Context* context);
-			
-			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+    class _DialogExport AnswerId : public BaseObject
+    {
+        public:
+            AnswerId(Context* context);
 
-            void setId(const std::string& Id);	//allows to set Id, only use in xmlPort for initializing AnswerIds in lvl files
-            const std::string& getId() const;	//allows to get Id, used in xmlPort
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-		private: 
-			std::string id_;	//!< id of one answer
-	};
+            void setId(const std::string& Id);  //allows to set Id, only use in xmlPort for initializing AnswerIds in lvl files
+            const std::string& getId() const;   //allows to get Id, used in xmlPort
+
+        private:
+            std::string id_;    //!< id of one answer
+    };
 }
 
 #endif

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -37,25 +37,25 @@
 namespace orxonox
 {
 
-	RegisterClass(Dialog);
-	
-	//Constructor: 
-	Dialog::Dialog(Context* context) : BaseObject(context)
-	{
-		RegisterObject(Dialog);
-	}
+    RegisterClass(Dialog);
 
-	void Dialog::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-	{
-		SUPER(Dialog, XMLPort, xmlelement, mode);
+    //Constructor:
+    Dialog::Dialog(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Dialog);
+    }
 
-		XMLPortParam(Dialog, "name", setName, getName, xmlelement, mode);
-		XMLPortParam(Dialog, "currentQuestionId", setCurrentQuestionId, getCurrentQuestionId, xmlelement, mode);
-		XMLPortObject(Dialog, Question, "questions", addQuestion, getQuestion, xmlelement, mode);
-		XMLPortObject(Dialog, Answer, "answers", addAnswer, getAnswer, xmlelement, mode);
-	}
+    void Dialog::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Dialog, XMLPort, xmlelement, mode);
 
-	void Dialog::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
+        XMLPortParam(Dialog, "name", setName, getName, xmlelement, mode);
+        XMLPortParam(Dialog, "currentQuestionId", setCurrentQuestionId, getCurrentQuestionId, xmlelement, mode);
+        XMLPortObject(Dialog, Question, "questions", addQuestion, getQuestion, xmlelement, mode);
+        XMLPortObject(Dialog, Answer, "answers", addAnswer, getAnswer, xmlelement, mode);
+    }
+
+    void Dialog::XMLEventPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(Dialog, XMLEventPort, xmlelement, mode);
 
@@ -62,34 +62,34 @@
         XMLPortEventSink(Dialog, BaseObject, "execute", execute, xmlelement, mode); 
     }
 
-	void Dialog::setName(const std::string& name)
-	{
-		this->name_ = name;
-	}
+    void Dialog::setName(const std::string& name)
+    {
+        this->name_ = name;
+    }
 
-	const std::string& Dialog::getName() const 
-	{
-		return this->name_;
-	}
+    const std::string& Dialog::getName() const
+    {
+        return this->name_;
+    }
 
-	void Dialog::setCurrentQuestionId(const std::string& questionId)
-	{
-		this->currentQuestionId_ = questionId;
-	}
+    void Dialog::setCurrentQuestionId(const std::string& questionId)
+    {
+        this->currentQuestionId_ = questionId;
+    }
 
-	const std::string& Dialog::getCurrentQuestionId() const
-	{
-		return this->currentQuestionId_;
-	}
+    const std::string& Dialog::getCurrentQuestionId() const
+    {
+        return this->currentQuestionId_;
+    }
 
 
-	void Dialog::addQuestion(Question* question) //fuegt Question der Map hinzu
-	{
-		this->questions_.insert(make_pair(question->getQuestionId(), question));
-	}
+    void Dialog::addQuestion(Question* question) //fuegt Question der Map hinzu
+    {
+        this->questions_.insert(make_pair(question->getQuestionId(), question));
+    }
 
-	Question* Dialog::getQuestion(unsigned int index) const
-	{
+    Question* Dialog::getQuestion(unsigned int index) const
+    {
         unsigned int i = 0;
         for (auto entry : this->questions_)
         {
@@ -98,15 +98,15 @@
             ++i;
         }
         return nullptr;
-	}
+    }
 
-	void Dialog::addAnswer(Answer* answer) //fuegt Answer der Map hinzu
-	{
-		this->answers_.insert(make_pair(answer->getAnswerId(), answer));
-	}
+    void Dialog::addAnswer(Answer* answer) //fuegt Answer der Map hinzu
+    {
+        this->answers_.insert(make_pair(answer->getAnswerId(), answer));
+    }
 
-	Answer* Dialog::getAnswer(unsigned int index) const
-	{
+    Answer* Dialog::getAnswer(unsigned int index) const
+    {
         unsigned int i = 0;
         for (auto entry : this->answers_)
         {
@@ -115,50 +115,50 @@
             ++i;
         }
         return nullptr;
-	}
+    }
 
 
-	const std::vector<std::string>& Dialog::getAnswerIds() const // returned vector mit allen momentanen AntwortenIds
-	{
-		
-		Question* question = (this->questions_.find(this->currentQuestionId_))->second;
-		return question->getAnswerIds();
-		
-	} 
-	
-	bool Dialog::execute(bool bTriggered, BaseObject* trigger)
+    const std::vector<std::string>& Dialog::getAnswerIds() const // returned vector mit allen momentanen AntwortenIds
+    {
+
+        Question* question = (this->questions_.find(this->currentQuestionId_))->second;
+        return question->getAnswerIds();
+
+    }
+
+    bool Dialog::execute(bool bTriggered, BaseObject* trigger)
     {  
-    	DialogManager& m = DialogManager::getInstance();
-    	
-    	if(questions_.count(this->currentQuestionId_)){
-    		m.setDialog(this);
-    		OrxonoxOverlay::showOverlay("Dialog");
-    	}
-    	else {
-    		orxout() << "no start defined " << endl;
-    	}
-    	
+        DialogManager& m = DialogManager::getInstance();
+
+        if(questions_.count(this->currentQuestionId_)){
+            m.setDialog(this);
+            OrxonoxOverlay::showOverlay("Dialog");
+        }
+        else {
+            orxout() << "no start defined " << endl;
+        }
+
         return false;
     }
 
     void Dialog::update(const std::string& givenAnswerId)
     {
-    	Answer* answer = (answers_.find(givenAnswerId))->second;
-    	this->currentQuestionId_ = answer->getNextQuestion();
+        Answer* answer = (answers_.find(givenAnswerId))->second;
+        this->currentQuestionId_ = answer->getNextQuestion();
     }
 
     bool Dialog::ending(const std::string& givenAnswerId)
     {
-    	return !this->questions_.count(this->answers_.find(givenAnswerId)->second->getNextQuestion());
+        return !this->questions_.count(this->answers_.find(givenAnswerId)->second->getNextQuestion());
     }
 
-	const std::string& Dialog::getQuestionString()
-	{
-		return this->questions_.find(this->currentQuestionId_)->second->getQuestion();
-	}
+    const std::string& Dialog::getQuestionString()
+    {
+        return this->questions_.find(this->currentQuestionId_)->second->getQuestion();
+    }
 
-	const std::string& Dialog::getAnswerString(const std::string& answerId)
-	{
-		return this->answers_.find(answerId)->second->getAnswer();
-	}
+    const std::string& Dialog::getAnswerString(const std::string& answerId)
+    {
+        return this->answers_.find(answerId)->second->getAnswer();
+    }
 }

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Dialog.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -43,103 +43,103 @@
 
 namespace orxonox
 {
-		/**
-	@brief
+    /**
+    @brief
     class containing core of one dialog with one npc
 
     this class contains a map of all answerids to answers (player text options) and one of all questionids to questions (npc text options)
     it realizes a state machine with the question beeing the states and the answers beeing the connections, it has a current state and
     can be commanded to go to the next state according to a given answer
-	*/
+    */
 
-	class _DialogExport Dialog : public BaseObject
-	{
-		public:
-			Dialog(Context* context);
+    class _DialogExport Dialog : public BaseObject
+    {
+        public:
+            Dialog(Context* context);
 
-			virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-			virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
 
-			void setName(const std::string& name);	//xmlPort-Funktion, sets Namen
-			const std::string& getName() const;	//xmlPort-Funktion, returns Namen
+            void setName(const std::string& name); //xmlPort-Funktion, sets Namen
+            const std::string& getName() const; //xmlPort-Funktion, returns Namen
 
-			void setCurrentQuestionId(const std::string& questionId);	//xmlPort-Funktion, sets string id of current question
-			const std::string& getCurrentQuestionId() const;	//xmlPort-Funktion, returns id of current question
+            void setCurrentQuestionId(const std::string& questionId); //xmlPort-Funktion, sets string id of current question
+            const std::string& getCurrentQuestionId() const; //xmlPort-Funktion, returns id of current question
 
-			void addQuestion(Question* question); //xmlPort-Funktion, adds question to map
-			Question* getQuestion(unsigned int index) const; //xmlPort-Funktion
+            void addQuestion(Question* question); //xmlPort-Funktion, adds question to map
+            Question* getQuestion(unsigned int index) const; //xmlPort-Funktion
 
-			void addAnswer(Answer* answer); //xmlPort-Funktion, adds answer to map
-			Answer* getAnswer(unsigned int index) const; //xmlPort-Funktion
+            void addAnswer(Answer* answer); //xmlPort-Funktion, adds answer to map
+            Answer* getAnswer(unsigned int index) const; //xmlPort-Funktion
 
-			/**
-	        @brief
-	            returns a pointer to the array of answers belonging to the current question for use in dialogManager
+            /**
+            @brief
+                returns a pointer to the array of answers belonging to the current question for use in dialogManager
 
-	        @return
-	            pointer to answerId array of question
-	        */
-			const std::vector<std::string>& getAnswerIds() const;
+            @return
+                pointer to answerId array of question
+            */
+            const std::vector<std::string>& getAnswerIds() const;
 
-			/**
-	        @brief
-	            function called when the trigger object defined in the xml file sets to triggered
+            /**
+            @brief
+                function called when the trigger object defined in the xml file sets to triggered
 
-	        @param bTriggered
-	            needs to be set like this for correctness
-	        @param trigger
-	            needs to be set like this for correctness
-	        @return
-	           	not really used
-	        */
-	 		bool execute(bool bTriggered, BaseObject* trigger);
+            @param bTriggered
+                needs to be set like this for correctness
+            @param trigger
+                needs to be set like this for correctness
+            @return
+                not really used
+            */
+            bool execute(bool bTriggered, BaseObject* trigger);
 
-	 		/**
-	        @brief
-	            updates the current Dialog according to the id of a given answer, by setting currentQuestionId to the next one
+            /**
+            @brief
+                updates the current Dialog according to the id of a given answer, by setting currentQuestionId to the next one
 
-	        @param givenAnswerId
-	        	id of the answer given by player
-	        */
-			void update(const std::string& givenAnswerId);
+            @param givenAnswerId
+                id of the answer given by player
+            */
+            void update(const std::string& givenAnswerId);
 
-			/**
-	        @brief
-	            tests if there is a next question for the given answerId
+            /**
+            @brief
+                tests if there is a next question for the given answerId
 
-	        @param givenAnswerId
-				id of the answer given by player
-	        @return
-	           	true if there is no more Question to the given answerId
-	        */
-			bool ending(const std::string& givenAnswerId);
+            @param givenAnswerId
+                id of the answer given by player
+            @return
+                true if there is no more Question to the given answerId
+            */
+            bool ending(const std::string& givenAnswerId);
 
-			/**
-	        @brief
-	            gives the text of the npc in the current state
+            /**
+            @brief
+                gives the text of the npc in the current state
 
-	        @return
-	           	sting with npc text
-	        */
-			const std::string& getQuestionString();
+            @return
+                sting with npc text
+            */
+            const std::string& getQuestionString();
 
-			/**
-	        @brief
-	            returns a sting with the pc answer to the id 
+            /**
+            @brief
+                returns a sting with the pc answer to the id
 
-	        @param answerId
-	        	the id of the answer looked for
-	        @return
-	           	sting with answer
-	        */
-			const std::string& getAnswerString(const std::string& answerId);
+            @param answerId
+                the id of the answer looked for
+            @return
+                sting with answer
+            */
+            const std::string& getAnswerString(const std::string& answerId);
 
-		private: 
-			std::string name_;	//!< name of the npc talking
-			std::string currentQuestionId_;	//!< id of the npc question currently active
-			std::map<std::string, Question*> questions_;	//!< a map form the ids of npc textoptions to the objects containing them
-			std::map<std::string, Answer*> answers_;	//!< a map form the ids of npc textoptions to the objects containing them
-	};
+        private:
+            std::string name_; //!< name of the npc talking
+            std::string currentQuestionId_; //!< id of the npc question currently active
+            std::map<std::string, Question*> questions_; //!< a map form the ids of npc textoptions to the objects containing them
+            std::map<std::string, Answer*> answers_; //!< a map form the ids of npc textoptions to the objects containing them
+    };
 }
 
 #endif

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/DialogManager.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/DialogManager.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/DialogManager.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -32,27 +32,27 @@
 #include <string>
 
 namespace orxonox {
-	ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
-	
+    ManageScopedSingleton(DialogManager, ScopeID::ROOT, false);
 
-	
-	DialogManager::DialogManager()
-	{
-		this->currentTalk_ = nullptr;
-		this->answerIds_ = nullptr;
-	}
 
-	void DialogManager::setDialog(Dialog* dialog)
-	{
-		this->currentTalk_ = dialog;
-		this->answerIds_ = &this->currentTalk_->getAnswerIds();
-	}
 
-	//from here onward funcionality for lua axports
+    DialogManager::DialogManager()
+    {
+        this->currentTalk_ = nullptr;
+        this->answerIds_ = nullptr;
+    }
 
+    void DialogManager::setDialog(Dialog* dialog)
+    {
+        this->currentTalk_ = dialog;
+        this->answerIds_ = &this->currentTalk_->getAnswerIds();
+    }
+
+    //from here onward funcionality for lua axports
+
     std::string DialogManager::getQuestion()
     {
-    	return this->currentTalk_->getQuestionString();
+        return this->currentTalk_->getQuestionString();
     }
 
     int DialogManager::getSize()
@@ -62,12 +62,12 @@
 
     std::string DialogManager::getAnswer(int index)
     {
-    	return this->currentTalk_->getAnswerString(this->answerIds_->at(index));
+        return this->currentTalk_->getAnswerString(this->answerIds_->at(index));
     }
-	
+
     std::string DialogManager::getPerson()
     {
-    	return this->currentTalk_->getName();
+        return this->currentTalk_->getName();
     }
 
     bool DialogManager::endtest(int index)
@@ -85,7 +85,7 @@
 
     void DialogManager::update(int index)
     {
-    	this->currentTalk_->update(this->answerIds_->at(index));
-    	this->answerIds_ = &this->currentTalk_->getAnswerIds();
+        this->currentTalk_->update(this->answerIds_->at(index));
+        this->answerIds_ = &this->currentTalk_->getAnswerIds();
     }
 }

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Question.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Question.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Question.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -32,56 +32,55 @@
 namespace orxonox
 {
 
-	RegisterClass(Question);
+    RegisterClass(Question);
 
-	Question::Question(Context* context) : BaseObject(context)
-	{
-		RegisterObject(Question);
-	}
+    Question::Question(Context* context) : BaseObject(context)
+    {
+        RegisterObject(Question);
+    }
 
-	void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
-	{
-		SUPER(Question, XMLPort, xmlement, mode);
+    void Question::XMLPort(Element& xmlement, XMLPort::Mode mode)
+    {
+        SUPER(Question, XMLPort, xmlement, mode);
 
-		XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
-		XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
+        XMLPortParam(Question, "question", setQuestion, getQuestion, xmlement, mode);
+        XMLPortParam(Question, "Id", setQuestionId, getQuestionId, xmlement, mode);
 
-		XMLPortObject(Question, AnswerId, "answerIds", addAnswerId, getAnswerId, xmlement, mode);
-	}
+        XMLPortObject(Question, AnswerId, "answerIds", addAnswerId, getAnswerId, xmlement, mode);
+    }
 
-	void Question::setQuestionId(const std::string& Id)
-	{
-		this->questionId_ = Id;
-	}
+    void Question::setQuestionId(const std::string& Id)
+    {
+        this->questionId_ = Id;
+    }
 
-	const std::string& Question::getQuestionId() const
-	{
-		return this->questionId_;
-	}
+    const std::string& Question::getQuestionId() const
+    {
+        return this->questionId_;
+    }
 
-	void Question::setQuestion(const std::string& question)
-	{
-		this->question_ = question;
-	}
+    void Question::setQuestion(const std::string& question)
+    {
+        this->question_ = question;
+    }
 
-	const std::string& Question::getQuestion() const
-	{
-		return this->question_;
-	}
+    const std::string& Question::getQuestion() const
+    {
+        return this->question_;
+    }
 
-	void Question::addAnswerId(AnswerId* answerId)
-	{
-		this->answerIds_.push_back(answerId->getId());
-	}
+    void Question::addAnswerId(AnswerId* answerId)
+    {
+        this->answerIds_.push_back(answerId->getId());
+    }
 
-	AnswerId* Question::getAnswerId(unsigned int index) const
-	{
-		return nullptr;
-	}
+    AnswerId* Question::getAnswerId(unsigned int index) const
+    {
+        return nullptr;
+    }
 
-	const std::vector<std::string>& Question::getAnswerIds() const
-	{
-		return this->answerIds_;
-	}
-	
+    const std::vector<std::string>& Question::getAnswerIds() const
+    {
+        return this->answerIds_;
+    }
 }

Modified: code/branches/Presentation_HS17_merge/src/modules/dialog/Question.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/dialog/Question.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/modules/dialog/Question.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -41,45 +41,45 @@
 namespace orxonox
 {
 
-	/**
-	@brief
+    /**
+    @brief
     class containing the npc side of the Dialog
 
     this class contains one possible text option of the npc, it's id and the ids of possible player reactions (answers)
-	*/
+    */
 
-	class _DialogExport Question : public BaseObject
-	{
-		public:
-			Question(Context* context);
+    class _DialogExport Question : public BaseObject
+    {
+        public:
+            Question(Context* context);
 
-			virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmelement, XMLPort::Mode mode);
 
-			void setQuestionId(const std::string& Id);	//xmlPort-Funktion, setzt Id
-			const std::string& getQuestionId() const;	//xmlPort-Funktion, gibt Id string zuruek
+            void setQuestionId(const std::string& Id); //xmlPort-Funktion, setzt Id
+            const std::string& getQuestionId() const; //xmlPort-Funktion, gibt Id string zuruek
 
-			void setQuestion(const std::string& question);	//xmlPort-Funktion, setzt Fragen string
-			const std::string& getQuestion() const;	//xmlPort-Funktion, gibt Fragen string
+            void setQuestion(const std::string& question); //xmlPort-Funktion, setzt Fragen string
+            const std::string& getQuestion() const; //xmlPort-Funktion, gibt Fragen string
 
-			void addAnswerId(AnswerId* answerId); 	//xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
-			AnswerId* getAnswerId(unsigned int index) const;	//xmlPort-Funktion, gibt nichts zuruek
+            void addAnswerId(AnswerId* answerId);  //xmlPort-Funktion, nimmt AnswerIds von entsprechenden Objekten und fuegt sie in List ein.
+            AnswerId* getAnswerId(unsigned int index) const; //xmlPort-Funktion, gibt nichts zuruek
 
-			/**
-	        @brief
-	            gives pointer to possivle answerIds of this question
+            /**
+            @brief
+                gives pointer to possivle answerIds of this question
 
-	        @return
-	           	returns pointer to the array with ids of possible pc textoptions
-	        */
-			const std::vector<std::string>& getAnswerIds() const; //returnt Pointer auf Vektor mit allen Ids
+            @return
+                returns pointer to the array with ids of possible pc textoptions
+            */
+            const std::vector<std::string>& getAnswerIds() const; //returnt Pointer auf Vektor mit allen Ids
 
 
 
-		private: 	
-			std::string questionId_;	//!< id of npc textoption	
-			std::string question_;	//!< string with npc text
-			std::vector<std::string> answerIds_;	//!< vector with possible player reactions
-	};
+        private:
+            std::string questionId_; //!< id of npc textoption
+            std::string question_; //!< string with npc text
+            std::vector<std::string> answerIds_; //!< vector with possible player reactions
+    };
 }
 
 #endif

Modified: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.cc	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.cc	2018-02-19 23:09:09 UTC (rev 11782)
@@ -25,11 +25,11 @@
  *      Claudio Fanconi
  *
  *
- *	 Authors' Note:
- *	 The following class inherits of its superclass planet
- * 	 It is meant only for the Campaign Map
- *	 This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play) 
- *	 
+ *   Authors' Note:
+ *   The following class inherits of its superclass planet
+ *   It is meant only for the Campaign Map
+ *   This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play)
+ *
  */
 
 #include "NameableStaticEntity.h"
@@ -52,4 +52,4 @@
         SUPER(NameableStaticEntity, XMLPort, xmlelement, mode);
         XMLPortParam(NameableStaticEntity, "levelName", setLevelName, getLevelName, xmlelement, mode);
     }
-}
\ No newline at end of file
+}

Modified: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/NameableStaticEntity.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -40,9 +40,9 @@
 { 
     class _OrxonoxExport NameableStaticEntity : public StaticEntity
     {
-    	public:
-    		NameableStaticEntity(Context* context);
-    		virtual ~NameableStaticEntity();
+        public:
+            NameableStaticEntity(Context* context);
+            virtual ~NameableStaticEntity();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
             inline void setLevelName(const std::string& levelname)

Modified: code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.h	2018-02-19 22:48:23 UTC (rev 11781)
+++ code/branches/Presentation_HS17_merge/src/orxonox/worldentities/pawns/ShootableObstacle.h	2018-02-19 23:09:09 UTC (rev 11782)
@@ -37,30 +37,30 @@
     class _OrxonoxExport ShootableObstacle
         : public Pawn
     {
-	    public:
-	    	ShootableObstacle(Context* context);
-	        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
-	        virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
+        public:
+            ShootableObstacle(Context* context);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint) override;
 
-	        inline void setCollisionDamage(float c)
-	                { this->collisionDamage_ = c; }
+            inline void setCollisionDamage(float c)
+                    { this->collisionDamage_ = c; }
 
-	        inline float getCollisionDamage()
-	            { return this->collisionDamage_; }
+            inline float getCollisionDamage()
+                { return this->collisionDamage_; }
 
-	        inline void setEnableCollisionDamage(bool c)
-	        {
-	            this->enableCollisionDamage_ = c;
-	            this->enableCollisionCallback();
-	        }
+            inline void setEnableCollisionDamage(bool c)
+            {
+                this->enableCollisionDamage_ = c;
+                this->enableCollisionCallback();
+            }
 
-	        inline bool getEnableCollisionDamage()
-	            { return this->enableCollisionDamage_; }
+            inline bool getEnableCollisionDamage()
+                { return this->enableCollisionDamage_; }
 
-	    private:
-	    	float collisionDamage_;
-	        bool enableCollisionDamage_;
+        private:
+            float collisionDamage_;
+            bool enableCollisionDamage_;
     };
 }
 
-#endif
\ No newline at end of file
+#endif



More information about the Orxonox-commit mailing list