- in observer mode, show queued work for all factions
- when showing queues, now also show up to a max of 4 details for the first 4 items in the queue
This commit is contained in:
parent
69a627dca7
commit
dd9b984a82
|
@ -61,12 +61,12 @@ void Selection::select(Unit *unit){
|
|||
}
|
||||
|
||||
//check if enemy
|
||||
if(unit->getFactionIndex()!=factionIndex && !isEmpty()){
|
||||
if(unit->getFactionIndex() != factionIndex && !isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//check existing enemy
|
||||
if(selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex()!=factionIndex){
|
||||
if(selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex() != factionIndex) {
|
||||
clear();
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,9 @@ bool Selection::isUniform() const{
|
|||
}
|
||||
|
||||
bool Selection::isEnemy() const{
|
||||
return selectedUnits.size()==1 && selectedUnits.front()->getFactionIndex()!=factionIndex;
|
||||
return selectedUnits.size() == 1 &&
|
||||
(selectedUnits.front()->getFactionIndex() != factionIndex ||
|
||||
factionIndex == (GameConstants::maxPlayers -1 + fpt_Observer));
|
||||
}
|
||||
|
||||
bool Selection::isCommandable() const{
|
||||
|
|
|
@ -1472,11 +1472,18 @@ string Unit::getDesc() const {
|
|||
//command info
|
||||
if(commands.empty() == false) {
|
||||
str+= "\n" + commands.front()->getCommandType()->getName();
|
||||
if(commands.size()>1){
|
||||
str+="\n"+lang.get("OrdersOnQueue")+": "+intToStr(commands.size());
|
||||
if(commands.size() > 1) {
|
||||
str += "\n" + lang.get("OrdersOnQueue") + ": " + intToStr(commands.size());
|
||||
Commands::const_iterator it= commands.begin();
|
||||
for(unsigned int i = 0; i < min((size_t)4,commands.size()); ++i) {
|
||||
const CommandType *ct = (*it)->getCommandType();
|
||||
//str += "\n" + ct->getDesc(this->getTotalUpgrade());
|
||||
str += "\n#" + intToStr(i+1) + " " + ct->getName();
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
//can store
|
||||
if(getType()->getStoredResourceCount()>0){
|
||||
for(int i=0; i<getType()->getStoredResourceCount(); ++i){
|
||||
|
|
Loading…
Reference in New Issue