Merge lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 7936
Proposed branch: lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback
Merge into: lp:widelands
Diff against target: 38 lines (+15/-0)
1 file modified
src/editor/ui_menus/editor_main_menu_random_map.cc (+15/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback
Reviewer Review Type Date Requested Status
Miroslav Remák Approve
Review via email: mp+290803@code.launchpad.net

Commit message

After a random map has been generated, a message window will inform the player that the player starting positions need to be checked.

Description of the change

Generating viable player starting positions is a hard problem, and I don't think that we will ever be able to guarantee good starting positions 100% of the time, and not for Build 19 in any case. So, I think we should go with a message to the user for now.

I think the starting positions are still useful, because they will give the player something to start from.

To post a comment you must log in.
Revision history for this message
Miroslav Remák (miroslavr256) wrote :

LGTM.

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks!

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc'
--- src/editor/ui_menus/editor_main_menu_random_map.cc 2016-03-26 18:42:32 +0000
+++ src/editor/ui_menus/editor_main_menu_random_map.cc 2016-04-02 18:47:17 +0000
@@ -37,6 +37,7 @@
37#include "logic/map.h"37#include "logic/map.h"
38#include "logic/map_objects/world/world.h"38#include "logic/map_objects/world/world.h"
39#include "random/random.h"39#include "random/random.h"
40#include "ui_basic/messagebox.h"
40#include "ui_basic/progresswindow.h"41#include "ui_basic/progresswindow.h"
4142
42using namespace Widelands;43using namespace Widelands;
@@ -426,6 +427,8 @@
426}427}
427428
428void MainMenuNewRandomMap::clicked_create_map() {429void MainMenuNewRandomMap::clicked_create_map() {
430 ok_button_.set_enabled(false);
431 cancel_button_.set_enabled(false);
429 EditorInteractive & eia =432 EditorInteractive & eia =
430 dynamic_cast<EditorInteractive&>(*get_parent());433 dynamic_cast<EditorInteractive&>(*get_parent());
431 Widelands::EditorGameBase & egbase = eia.egbase();434 Widelands::EditorGameBase & egbase = eia.egbase();
@@ -463,6 +466,18 @@
463466
464 map.recalc_whole_map(egbase.world());467 map.recalc_whole_map(egbase.world());
465 eia.map_changed(EditorInteractive::MapWas::kReplaced);468 eia.map_changed(EditorInteractive::MapWas::kReplaced);
469 UI::WLMessageBox mbox
470 (&eia,
471 /** TRANSLATORS: Window title. This is shown after a random map has been created in the editor.*/
472 _("Random Map"),
473 /** TRANSLATORS: This is shown after a random map has been created in the editor. */
474 /** TRANSLATORS: You don't need to be literal with your translation, */
475 /** TRANSLATORS: as long as the user understands that he needs to check the player positions.*/
476 _("The map has been generated. "
477 "Please double-check the player starting positions to make sure that your carriers won’t drown, "
478 "or be stuck on an island or on top of a mountain."),
479 UI::WLMessageBox::MBoxType::kOk);
480 mbox.run<UI::Panel::Returncodes>();
466 die();481 die();
467}482}
468483

Subscribers

People subscribed via source and target branches

to status/vote changes: