[Orxonox-commit 7097] r11714 - code/trunk/src/orxonox
landauf at orxonox.net
landauf at orxonox.net
Sun Jan 7 20:03:19 CET 2018
Author: landauf
Date: 2018-01-07 20:03:19 +0100 (Sun, 07 Jan 2018)
New Revision: 11714
Modified:
code/trunk/src/orxonox/LevelInfo.cc
code/trunk/src/orxonox/LevelInfo.h
Log:
[Highscore_HS16] reverted changes in LevelInfo - they don't seem to be needed (everything is done by the Highscore class)
Modified: code/trunk/src/orxonox/LevelInfo.cc
===================================================================
--- code/trunk/src/orxonox/LevelInfo.cc 2018-01-07 10:54:22 UTC (rev 11713)
+++ code/trunk/src/orxonox/LevelInfo.cc 2018-01-07 19:03:19 UTC (rev 11714)
@@ -150,16 +150,6 @@
return success;
}
- bool LevelInfoItem::addHighscore(const std::string& name, const int score)
- {
- std::stringstream stream;
- stream << name << "/:/" << score;
- bool success = this->highscores_.insert(stream.str()).second;
- if(success)
- this->highscoresUpdated();
- return success;
- }
-
/**
@brief
Add a ship model to allowed models for the shipselection
@@ -200,21 +190,6 @@
this->tagsString_ = std::string(stream.str());
}
- void LevelInfoItem::highscoresUpdated(void)
- {
- std::stringstream stream;
- std::set<std::string>::iterator temp;
- for(std::set<std::string>::iterator it = this->highscores_.begin(); it != this->highscores_.end(); )
- {
- temp = it;
- if(++it == this->highscores_.end()) // If this is the last tag we don't add a comma.
- stream << *temp;
- else
- stream << *temp << ", ";
- }
-
- this->highscoresString_ = std::string(stream.str());
- }
/**
@brief
Updates the comma-seperated string of all ships, if the set of tags has changed.
Modified: code/trunk/src/orxonox/LevelInfo.h
===================================================================
--- code/trunk/src/orxonox/LevelInfo.h 2018-01-07 10:54:22 UTC (rev 11713)
+++ code/trunk/src/orxonox/LevelInfo.h 2018-01-07 19:03:19 UTC (rev 11714)
@@ -117,10 +117,6 @@
*/
inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
- bool addHighscore(const std::string& name,const int score);
-
- inline const std::string& getHighscores(void) const { return this->highscoresString_; } // tolua_export
-
void setStartingShips(const std::string& ships); //!< Set the starting ship models of the level
bool addStartingShip(const std::string& ship, bool update = true); //!< Add a model to shipselection
/**
@@ -157,7 +153,6 @@
void changeStartingShip (const std::string& model);
void startingshipsUpdated(void); //!< Updates the comma-seperated string of all possible starting ships.
void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
- void highscoresUpdated(void);
static void initializeTags(void); //!< Initialize the set of allowed tags.
/**
@brief Check whether an input tag is allowed.
@@ -174,10 +169,6 @@
std::string description_; //!< The description of the Level.
std::string screenshot_; //!< The screenshot of the Level.
std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
-
- std::set<std::string> highscores_;
- std::string highscoresString_;
-
std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
std::set<std::string> startingShips_; //!< The set of starting ship models the Level allows.
std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
@@ -252,9 +243,6 @@
*/
inline const std::string& getTags(void) const
{ return this->LevelInfoItem::getTags(); }
-
- inline const std::string& getHighscores(void) const
- { return this->LevelInfoItem::getHighscores(); }
/**
@brief Set the starting ship models of the level
@param ships A comma-seperated string of all the allowed ship models for the shipselection.
More information about the Orxonox-commit
mailing list