- only show queued # in text if queued commandcount > 1

This commit is contained in:
Mark Vejvoda 2011-05-01 02:31:36 +00:00
parent 3ed7d242d9
commit 5ef1313296
1 changed files with 6 additions and 2 deletions

View File

@ -1476,8 +1476,12 @@ string Unit::getDesc() const {
Commands::const_iterator it= commands.begin();
for(unsigned int i = 0; i < min((size_t)maxQueuedCommandDisplayCount,commands.size()); ++i) {
const CommandType *ct = (*it)->getCommandType();
//str += "\n" + ct->getDesc(this->getTotalUpgrade());
str += "\n#" + intToStr(i+1) + " " + ct->getName();
if(commands.size() == 1) {
str += "\n" + ct->getName();
}
else {
str += "\n#" + intToStr(i+1) + " " + ct->getName();
}
it++;
}
}