widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #07075
[Merge] lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback into lp:widelands.
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.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1535065 in widelands: "Editor crashes with random map regarding player positions + starting positions that are not viable"
https://bugs.launchpad.net/widelands/+bug/1535065
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1535065-mapgen-user-feedback/+merge/290803
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.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1535065-mapgen-user-feedback into lp:widelands.
=== 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:44:54 +0000
@@ -37,6 +37,7 @@
#include "logic/map.h"
#include "logic/map_objects/world/world.h"
#include "random/random.h"
+#include "ui_basic/messagebox.h"
#include "ui_basic/progresswindow.h"
using namespace Widelands;
@@ -426,6 +427,8 @@
}
void MainMenuNewRandomMap::clicked_create_map() {
+ ok_button_.set_enabled(false);
+ cancel_button_.set_enabled(false);
EditorInteractive & eia =
dynamic_cast<EditorInteractive&>(*get_parent());
Widelands::EditorGameBase & egbase = eia.egbase();
@@ -463,6 +466,18 @@
map.recalc_whole_map(egbase.world());
eia.map_changed(EditorInteractive::MapWas::kReplaced);
+ UI::WLMessageBox mbox
+ (&eia,
+ /** TRANSLATORS: Window title. This is shown after a random map has been created in the editor.*/
+ _("Random Map"),
+ /** TRANSLATORS: This is shown after a random map has been created in the editor. */
+ /** TRANSLATORS: You don't need to be literal with your translation, */
+ /** TRANSLATORS: as long as the user understands that he needs to check the player position.*/
+ _("The map has been generated. "
+ "Please double-check the player starting positions to make sure that your carriers won’t drown, "
+ "or be stuck on an island or on top of a mountain."),
+ UI::WLMessageBox::MBoxType::kOk);
+ mbox.run<UI::Panel::Returncodes>();
die();
}
Follow ups