← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1645844-game-summary into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1645844-game-summary into lp:widelands.

Commit message:
Display en-dash for team 0 in game summary

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1645844 in widelands: "Display team 0 as -- in game results screen"
  https://bugs.launchpad.net/widelands/+bug/1645844

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1645844-game-summary/+merge/346916

The easiest way to test this is to hack

   local remaining_time

in one of the win conditions, so you don't have to wait for 4 hours gametime.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1645844-game-summary into lp:widelands.
=== modified file 'src/wui/game_summary.cc'
--- src/wui/game_summary.cc	2018-04-27 06:11:05 +0000
+++ src/wui/game_summary.cc	2018-05-27 07:22:25 +0000
@@ -156,7 +156,7 @@
 		assert(player_image);
 		te.set_picture(0, player_image, p->get_name());
 		// Team
-		std::string teastr_ =
+		std::string teastr_ = p->team_number() == 0 ? "—" :
 		   (boost::format("%|1$u|") % static_cast<unsigned int>(p->team_number())).str();
 		te.set_string(1, teastr_);
 		// Status


References