diff --git a/src/ui/mainscr.cpp b/src/ui/mainscr.cpp index 3d0b75e78..a548c1322 100644 --- a/src/ui/mainscr.cpp +++ b/src/ui/mainscr.cpp @@ -167,6 +167,27 @@ global void DrawUnitInfo(Unit* unit) DrawTextCentered(x+114,y+8+17,GameFont,type->Name); } + // + // Show for all players. + // + if( type->GoldMine ) { + DrawText(x+37,y+8+78,GameFont,"Gold Left:"); + DrawNumber(x+108,y+8+78,GameFont,unit->Value); + return; + } + if( type->GivesOil || type->OilPatch ) { + DrawText(x+47,y+8+78,GameFont,"Oil Left:"); + DrawNumber(x+108,y+8+78,GameFont,unit->Value); + return; + } + + // + // Only for owning player. + // + if( unit->Player!=ThisPlayer ) { + return; + } + // // Show progress for buildings only if they are selected. // @@ -230,13 +251,7 @@ global void DrawUnitInfo(Unit* unit) } } - if( type->GoldMine ) { - DrawText(x+37,y+8+78,GameFont,"Gold Left:"); - DrawNumber(x+108,y+8+78,GameFont,unit->Value); - } else if( type->GivesOil || type->OilPatch ) { - DrawText(x+47,y+8+78,GameFont,"Oil Left:"); - DrawNumber(x+108,y+8+78,GameFont,unit->Value); - } else if( type->StoresWood ) { + if( type->StoresWood ) { DrawText(x+20,y+8+78,GameFont,"Production"); DrawText(x+52,y+8+93,GameFont,"Lumber:"); // FIXME: if production plus isn't 25!