From 07169f5e7afe146bd0a02190183bfd7710039f2f Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Sun, 21 Feb 2016 21:00:26 +1100 Subject: [PATCH 01/57] tpreferences: fixup ad8468698916 The previous iteration caused a crash on exit if you weren't in the display tab, since the scale slider couldn't be found. This keeps the value of the slider in a class member variable so its always accessible. --- src/gui/dialogs/preferences_dialog.cpp | 15 +++++++++++++-- src/gui/dialogs/preferences_dialog.hpp | 5 +++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/preferences_dialog.cpp b/src/gui/dialogs/preferences_dialog.cpp index 50d4889191ad..5297bb35b4e6 100644 --- a/src/gui/dialogs/preferences_dialog.cpp +++ b/src/gui/dialogs/preferences_dialog.cpp @@ -90,6 +90,7 @@ tpreferences::tpreferences(CVideo& video, const config& game_cfg) , friend_names_() , last_selected_item_(0) , accl_speeds_() + , font_scaling_(font_scaling()) { BOOST_FOREACH(const config& adv, game_cfg.child_range("advanced_preference")) { adv_preferences_cfg_.push_back(adv); @@ -556,9 +557,14 @@ void tpreferences::initialize_members(twindow& window) set_idle_anim, set_idle_anim_rate, window); /** FONT SCALING **/ - // The setter is handled in post_show to avoid dynamically changing text tslider& scale_slider = find_widget(&window, "scaling_slider", false); + scale_slider.set_value(font_scaling()); + + connect_signal_notify_modified(scale_slider, boost::bind( + &tpreferences::font_scaling_slider_callback, + this, boost::ref(scale_slider))); + bind_status_label(scale_slider, "scaling_value", window, "%"); /** SELECT THEME **/ @@ -1006,6 +1012,11 @@ void tpreferences::max_autosaves_slider_callback(tslider& slider, tcontrol& stat status_label.set_label(get_max_autosaves_status_label(slider)); } +void tpreferences::font_scaling_slider_callback(tslider& slider) +{ + font_scaling_ = slider.get_value(); +} + void tpreferences::toggle_radio_callback( const std::vector >& vec, int& value, @@ -1044,7 +1055,7 @@ void tpreferences::on_tab_select(twindow& window, const std::string& widget_id) void tpreferences::post_show(twindow& window) { // Handle the font scaling setter only once prefs is closed - set_font_scaling(find_widget(&window, "scaling_slider", false).get_value()); + set_font_scaling(font_scaling_); } } // end namespace gui2 diff --git a/src/gui/dialogs/preferences_dialog.hpp b/src/gui/dialogs/preferences_dialog.hpp index ef4a96073d81..9ec96fbe6cd1 100644 --- a/src/gui/dialogs/preferences_dialog.hpp +++ b/src/gui/dialogs/preferences_dialog.hpp @@ -84,6 +84,7 @@ class tpreferences : public tdialog void fullscreen_toggle_callback(twindow& window); void accl_speed_slider_callback(tslider& slider); void max_autosaves_slider_callback(tslider& slider, tcontrol& status_label); + void font_scaling_slider_callback(tslider& slider); /** * Sets the initial state and callback for a simple bool-state toggle button @@ -199,6 +200,10 @@ class tpreferences : public tdialog int last_selected_item_; std::vector accl_speeds_; + + // Special variable to keep the value of the scaling slider, + // to be used in post_show + int font_scaling_; }; } // namespace gui2 From c08a87a255cb05d2e7cca67708e9b6754455a27e Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Sun, 21 Feb 2016 21:28:36 +1100 Subject: [PATCH 02/57] tpreferences: hopefully silenced unused parameter warning --- src/gui/dialogs/preferences_dialog.cpp | 2 +- src/gui/dialogs/preferences_dialog.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/preferences_dialog.cpp b/src/gui/dialogs/preferences_dialog.cpp index 5297bb35b4e6..307e6bcd04d5 100644 --- a/src/gui/dialogs/preferences_dialog.cpp +++ b/src/gui/dialogs/preferences_dialog.cpp @@ -1052,7 +1052,7 @@ void tpreferences::on_tab_select(twindow& window, const std::string& widget_id) set_visible_page(window, static_cast(selected_row), (widget_id + "_pager")); } -void tpreferences::post_show(twindow& window) +void tpreferences::post_show(twindow& /*window*/) { // Handle the font scaling setter only once prefs is closed set_font_scaling(font_scaling_); diff --git a/src/gui/dialogs/preferences_dialog.hpp b/src/gui/dialogs/preferences_dialog.hpp index 9ec96fbe6cd1..ca35767d8e8d 100644 --- a/src/gui/dialogs/preferences_dialog.hpp +++ b/src/gui/dialogs/preferences_dialog.hpp @@ -55,7 +55,7 @@ class tpreferences : public tdialog /** Inherited from tdialog. */ void pre_show(CVideo& video, twindow& window); - void post_show(twindow& window); + void post_show(twindow& /*window*/); /** Initializers */ void initialize_members(twindow& window); From 81389f4c880f3945d8cb96b8cee1789debf00563 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 21:28:00 +1100 Subject: [PATCH 03/57] gui2: tweaked layout of listbox header toggle button definition This lays out the text by a 5 left offset, alleviating the necessary use of a border in dialogs using this widget, since borders meant that the colors backgrounds would not be drawn. As such, any use of this widget should *not* have borders defined. --- .../widget/toggle_button_listbox_header.cfg | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/data/gui/default/widget/toggle_button_listbox_header.cfg b/data/gui/default/widget/toggle_button_listbox_header.cfg index 052ba8b4530b..d3c90b0dbae5 100644 --- a/data/gui/default/widget/toggle_button_listbox_header.cfg +++ b/data/gui/default/widget/toggle_button_listbox_header.cfg @@ -6,7 +6,7 @@ #define _GUI_TEXT FONT_SIZE FONT_COLOR [text] - x = 0 + x = 5 y = {GUI__TEXT_VERTICALLY_CENTRED} w = "(width)" h = "(text_height)" @@ -16,7 +16,7 @@ [/text] #enddef -#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT IMAGE_Y FONT_SIZE +#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT FONT_SIZE [resolution] {RESOLUTION} @@ -93,8 +93,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png~ROTATE(180)" [/image] [/draw] @@ -107,8 +107,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_DISABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png~ROTATE(180)~GS()" [/image] @@ -131,8 +131,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png~ROTATE(180)" [/image] @@ -160,8 +160,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png" [/image] [/draw] @@ -174,8 +174,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_DISABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png~GS()" [/image] @@ -198,8 +198,8 @@ {_GUI_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__TITLE}) } [image] - x = "(width - 10)" - y = {IMAGE_Y} + x = "(width - 15)" + y = "(height / 3)" name = "buttons/sliders/slider_arrow_blue.png" [/image] @@ -216,7 +216,7 @@ id = "listbox_header" description = "Checkbox." - {_GUI_RESOLUTION () 30 18 5 ({GUI_NORMAL__FONT_SIZE__SMALL}) } + {_GUI_RESOLUTION () 30 20 ({GUI_NORMAL__FONT_SIZE__SMALL}) } [/toggle_button_definition] From 34153effa85e135984bc84797c54ef2b5c979aff Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 21:28:54 +1100 Subject: [PATCH 04/57] gui2: removed borders from usecases of listbox_header type toggle buttons This deliberately excludes the addon_list dialog, since work is being done on that elsewhere. --- data/gui/default/window/game_load.cfg | 8 ++++---- data/gui/default/window/unit_create.cfg | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/data/gui/default/window/game_load.cfg b/data/gui/default/window/game_load.cfg index 303bbe64dbc1..ac80b746758c 100644 --- a/data/gui/default/window/game_load.cfg +++ b/data/gui/default/window/game_load.cfg @@ -239,8 +239,8 @@ [column] grow_factor = 1 horizontal_grow = "true" - border = "all" - border_size = 5 + + # No border by design [toggle_button] id = "sort_0" definition = "listbox_header" @@ -253,8 +253,8 @@ [column] grow_factor = 1 horizontal_grow = "true" - border = "all" - border_size = 5 + + # No border by design [toggle_button] id = "sort_1" definition = "listbox_header" diff --git a/data/gui/default/window/unit_create.cfg b/data/gui/default/window/unit_create.cfg index d165d9bd5c15..df010dc7ac4f 100644 --- a/data/gui/default/window/unit_create.cfg +++ b/data/gui/default/window/unit_create.cfg @@ -254,9 +254,8 @@ [column] grow_factor = 1 horizontal_grow = "true" - border = "all" - border_size = 5 + # No border by design [toggle_button] id = "sort_0" definition = "listbox_header" @@ -268,9 +267,8 @@ [column] grow_factor = 1 horizontal_grow = "true" - border = "all" - border_size = 5 + # No border by design [toggle_button] id = "sort_1" definition = "listbox_header" From 710b1fc3afb3f25d5e565e3a9a1fffe0b1f339ee Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 21:38:10 +1100 Subject: [PATCH 05/57] tgame_load: very subtle layout fix The Delete button wasn't perfectly aligned with the listbox scrollbar on the right. --- data/gui/default/window/game_load.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/gui/default/window/game_load.cfg b/data/gui/default/window/game_load.cfg index ac80b746758c..a8a43e1c146c 100644 --- a/data/gui/default/window/game_load.cfg +++ b/data/gui/default/window/game_load.cfg @@ -339,9 +339,9 @@ [grid] [row] - grow_factor = 1 [column] + grow_factor = 1 horizontal_alignment = "left" border = "bottom" border_size = 10 @@ -357,6 +357,7 @@ [/column] [column] + grow_factor = 0 horizontal_alignment = "right" border = "bottom" From 67cf95a5af3caefb3123da806126282997c1121d Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 22:07:14 +1100 Subject: [PATCH 06/57] gui2: cleanup of the text box widget design This reduces border size as well as removes a hack related to transparent backgrounds and text rendering. I can't observe any issue with text AA using semi-transparent backgrounds anymore. --- data/gui/default/widget/text_box_default.cfg | 33 ++------------------ 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/data/gui/default/widget/text_box_default.cfg b/data/gui/default/widget/text_box_default.cfg index 47929429f704..a0d56961d8f5 100644 --- a/data/gui/default/widget/text_box_default.cfg +++ b/data/gui/default/widget/text_box_default.cfg @@ -15,19 +15,12 @@ [/rectangle] #enddef -# -# Text antialiasing doesn't work as expected when rendering over a rectangle -# filled with an alpha < 255 color, so instead of using -# GUI__BACKGROUND_COLOR_ENABLED and GUI__BACKGROUND_COLOR_DISABLED for the -# textbox background, use fully opaque colors that correspond to the averages -# one would get with those two macros. -# #define _GUI_TEXTBOX_BACKGROUND_ENABLED - {_GUI_DRAW_BACKGROUND ("10, 13, 22, 255")} + {_GUI_DRAW_BACKGROUND ({GUI__BACKGROUND_COLOR_ENABLED})} #enddef #define _GUI_TEXTBOX_BACKGROUND_DISABLED - {_GUI_DRAW_BACKGROUND ("28, 31, 41, 255")} + {_GUI_DRAW_BACKGROUND ({GUI__BACKGROUND_COLOR_DISABLED})} #enddef #define _GUI_DRAW_BORDER COLOR @@ -37,17 +30,6 @@ w = "(width)" h = "(height)" - border_thickness = 3 - border_color = "55, 55, 55, 192" - - [/rectangle] - - [rectangle] - x = 1 - y = 1 - w = "(if(width < 2, 0, width - 2))" - h = "(if(height < 2, 0, height - 2))" - border_thickness = 1 border_color = {COLOR} @@ -55,17 +37,6 @@ #enddef #define _GUI_DRAW_TEXT SIZE COLOR - [rectangle] - x = "(text_x_offset + selection_offset)" - y = "(text_y_offset)" - w = "(selection_width)" - h = "(text_font_height)" - - border_thickness = 0 - fill_color = "21, 53, 80, 255" - - [/rectangle] - [text] x = "(text_x_offset)" y = "(text_y_offset)" From e85d504fbccac2aee80a1f24fe42351d5c51ac73 Mon Sep 17 00:00:00 2001 From: ln-zookeeper Date: Mon, 22 Feb 2016 14:19:18 +0200 Subject: [PATCH 07/57] Replaced feathered beach wave masks with hard-edged ones This both improves performance slightly and eliminates glitches resulting from the feathered masks overlapping. --- data/core/images/terrain/masks/7hex-bl-br.png | Bin 0 -> 288 bytes data/core/images/terrain/masks/7hex-bl-l.png | Bin 0 -> 312 bytes data/core/images/terrain/masks/7hex-bl.png | Bin 0 -> 312 bytes data/core/images/terrain/masks/7hex-br-bl.png | Bin 0 -> 292 bytes data/core/images/terrain/masks/7hex-br-r.png | Bin 0 -> 303 bytes data/core/images/terrain/masks/7hex-br.png | Bin 0 -> 315 bytes data/core/images/terrain/masks/7hex-l-bl.png | Bin 0 -> 292 bytes data/core/images/terrain/masks/7hex-l-tl.png | Bin 0 -> 292 bytes data/core/images/terrain/masks/7hex-l.png | Bin 0 -> 398 bytes data/core/images/terrain/masks/7hex-r-br.png | Bin 0 -> 290 bytes data/core/images/terrain/masks/7hex-r-tr.png | Bin 0 -> 293 bytes data/core/images/terrain/masks/7hex-r.png | Bin 0 -> 414 bytes data/core/images/terrain/masks/7hex-tl-l.png | Bin 0 -> 309 bytes data/core/images/terrain/masks/7hex-tl-tr.png | Bin 0 -> 257 bytes data/core/images/terrain/masks/7hex-tl.png | Bin 0 -> 315 bytes data/core/images/terrain/masks/7hex-tr-r.png | Bin 0 -> 313 bytes data/core/images/terrain/masks/7hex-tr-tl.png | Bin 0 -> 279 bytes data/core/images/terrain/masks/7hex-tr.png | Bin 0 -> 313 bytes .../images/terrain/water/waves-mask-bl-br.png | Bin 888 -> 0 bytes .../images/terrain/water/waves-mask-bl-l.png | Bin 1279 -> 0 bytes .../images/terrain/water/waves-mask-br-bl.png | Bin 944 -> 0 bytes .../images/terrain/water/waves-mask-br-r.png | Bin 1055 -> 0 bytes .../images/terrain/water/waves-mask-l-bl.png | Bin 928 -> 0 bytes .../images/terrain/water/waves-mask-l-tl.png | Bin 859 -> 0 bytes .../images/terrain/water/waves-mask-r-br.png | Bin 799 -> 0 bytes .../images/terrain/water/waves-mask-r-tr.png | Bin 841 -> 0 bytes .../images/terrain/water/waves-mask-tl-l.png | Bin 1103 -> 0 bytes .../images/terrain/water/waves-mask-tl-tr.png | Bin 1002 -> 0 bytes .../images/terrain/water/waves-mask-tr-r.png | Bin 1260 -> 0 bytes .../images/terrain/water/waves-mask-tr-tl.png | Bin 972 -> 0 bytes data/core/terrain-graphics/new-macros.cfg | 22 ++++-------------- 31 files changed, 4 insertions(+), 18 deletions(-) create mode 100644 data/core/images/terrain/masks/7hex-bl-br.png create mode 100644 data/core/images/terrain/masks/7hex-bl-l.png create mode 100644 data/core/images/terrain/masks/7hex-bl.png create mode 100644 data/core/images/terrain/masks/7hex-br-bl.png create mode 100644 data/core/images/terrain/masks/7hex-br-r.png create mode 100644 data/core/images/terrain/masks/7hex-br.png create mode 100644 data/core/images/terrain/masks/7hex-l-bl.png create mode 100644 data/core/images/terrain/masks/7hex-l-tl.png create mode 100644 data/core/images/terrain/masks/7hex-l.png create mode 100644 data/core/images/terrain/masks/7hex-r-br.png create mode 100644 data/core/images/terrain/masks/7hex-r-tr.png create mode 100644 data/core/images/terrain/masks/7hex-r.png create mode 100644 data/core/images/terrain/masks/7hex-tl-l.png create mode 100644 data/core/images/terrain/masks/7hex-tl-tr.png create mode 100644 data/core/images/terrain/masks/7hex-tl.png create mode 100644 data/core/images/terrain/masks/7hex-tr-r.png create mode 100644 data/core/images/terrain/masks/7hex-tr-tl.png create mode 100644 data/core/images/terrain/masks/7hex-tr.png delete mode 100644 data/core/images/terrain/water/waves-mask-bl-br.png delete mode 100644 data/core/images/terrain/water/waves-mask-bl-l.png delete mode 100644 data/core/images/terrain/water/waves-mask-br-bl.png delete mode 100644 data/core/images/terrain/water/waves-mask-br-r.png delete mode 100644 data/core/images/terrain/water/waves-mask-l-bl.png delete mode 100644 data/core/images/terrain/water/waves-mask-l-tl.png delete mode 100644 data/core/images/terrain/water/waves-mask-r-br.png delete mode 100644 data/core/images/terrain/water/waves-mask-r-tr.png delete mode 100644 data/core/images/terrain/water/waves-mask-tl-l.png delete mode 100644 data/core/images/terrain/water/waves-mask-tl-tr.png delete mode 100644 data/core/images/terrain/water/waves-mask-tr-r.png delete mode 100644 data/core/images/terrain/water/waves-mask-tr-tl.png diff --git a/data/core/images/terrain/masks/7hex-bl-br.png b/data/core/images/terrain/masks/7hex-bl-br.png new file mode 100644 index 0000000000000000000000000000000000000000..c0ad107b091910eb131f8f74bd038c7d0fe6dcca GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIVU__978JN-kft3WH1movS3~P<99wNonA7UX14S3j3^P6=M<(33K-5JjE2KEW71vrAORnCBX;_2$=vd$@?2>>j~ BZ=?VK literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-bl.png b/data/core/images/terrain/masks/7hex-bl.png new file mode 100644 index 0000000000000000000000000000000000000000..fd5e929526d7fb3a10201ebfcbe9e169aac22297 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIS)Kt978JN-kft3JfOh9vTSmRNPggoa8Epd=bdSgIVocIoP^C0nPh zyLRbnlvR{>{O;laCI$v32cO^5%~}f9o8Ab^df~+zyKct=*c)I$ztaD0e0s!(4Y?uH5 literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-br.png b/data/core/images/terrain/masks/7hex-br.png new file mode 100644 index 0000000000000000000000000000000000000000..ae68093515d2fa3057429af47eea31593d484bf6 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIgdSE978JN-kft3JfOh9vTf95m`|s^Mn>%A_$we`x>! literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-l-bl.png b/data/core/images/terrain/masks/7hex-l-bl.png new file mode 100644 index 0000000000000000000000000000000000000000..66d80a45cb7a38e3fdb5c6f4152e85ee841c1e0f GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIcGdw978JN-W*`$1@aCl{9eB8ID0mbi4OeU$_O(s95CQX`seHK+P|P- zHs`XFOJ6Sidg;rhs?4g)y(W9N#LbF}()ZP0JAK*oYu=Z=UsEJqzq{B6=nrPc7k^f- y>*AZ=z;w%dd*a7C2|LBk^G?f#F<$@XfjO0ZgEd#50he4BNWjz8&t;ucLK6U!0dM#K literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-l-tl.png b/data/core/images/terrain/masks/7hex-l-tl.png new file mode 100644 index 0000000000000000000000000000000000000000..9a4c9fcb3f01126d0e337e7f0fd7ac75834ea933 GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIcGdw978JN-kfvfWiSw6S-7tL^541bo(_!bS%I=3(4czRds*{a(d*G0 z_CBgopBbkqo3nn$zboeq85tOO4lj6k|I0rs4laX9nI}z7Zb_My5@qCTq&rh><}{zl zKHkebm#JP>xjZS8Qt5rN76L%mBuJFhzmo1*Fb(WBRDw^Qo2!qzY;QeC*wfX|Wt~$( F69A;zWElVe literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-l.png b/data/core/images/terrain/masks/7hex-l.png new file mode 100644 index 0000000000000000000000000000000000000000..ef8e8d9da9470265b0fd843b69ebd279b6a9a5a6 GIT binary patch literal 398 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jv*=C+Djv*CsZ_YXLG8hQ3EL>NA`S09zPY1^JtU#q8(4czRds*{a(d*G0 z_CBgopBbkqo3nn$zc+U_@*XhYVRpRp&pW-fiC$&7*_G9l<7(=-ZP6?WrDrpLyTJI#?uh&|Sv~7x-?MjlA6Qx`e%toio5(j4 z_AI~Gt8b>U%OwBD&c=U>gxjASZ4@hvp7G(*o`yG0_q(slPugy@$#jM8oY-00U3MOQ zur@({Qn>a9ztCe|o?-t#`7OP8YH`@*uUm`Roq!(aY5B93-Jp3t)5_rUp8ra^x-Ni% a6%3fo`b4E4-&yzt#Pf9Zb6Mw<&;$U*VWa5) literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-r-br.png b/data/core/images/terrain/masks/7hex-r-br.png new file mode 100644 index 0000000000000000000000000000000000000000..9efc6c0c61e520321573e84eed923aae4b1db376 GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIj1~b978JN-W+HIau^OT_#J#dfn_Tjh=U3WvYyWXinJvPe9o`Zs$yZi z*IVVAUPgg&ebxsLQ014G;MgRZ+ literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-r-tr.png b/data/core/images/terrain/masks/7hex-r-tr.png new file mode 100644 index 0000000000000000000000000000000000000000..3f8eb72b047c4a83ab66f1518e6c9f5440fc2122 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIcGgx978JN-kdY!Wl&&XF}$}w(@e%7=91QnpFBWmFbK2Jk9fEAx_AEG zFI6vXkAAj#8dtUV%hIwwP6mbq2{zvU%f4TC3}^_n;hv^BkM*?3`KHva^n*r6Hz&+| z6uH6YqfW%K3Nf8vill{gKEFM{$P0AOA%)+|w;gBqhB^+J;?rg1>ia(bDnCfj)78&q Iol`;+0Jg?uw*UYD literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-r.png b/data/core/images/terrain/masks/7hex-r.png new file mode 100644 index 0000000000000000000000000000000000000000..89616e2328d2b77d32515abe8a459b4dbe7ca943 GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jv*>0XLjv*CsZ_YXLG8hQ3EL>NAIkd3f(}D551W+j$tf`3GaL0T7^m|n= z&!3aM&A@ZmK;X#R{Uu&sGke%~929jF@?P@w!j}tG8C4m!CbnDTX30hI`|_`CU)Fxj z`Lgrtg)bLUOWM-J`TfTqr|)U!%TEt}-~MuKReOW%_P)J>hqAvNOOke&SLOWm`77P7 zZIi6OT|2Y>X1AZtlA>3v>*uW&SBuH{e4|@wf0};Wex<`J!_QT&i+h-Jbzk!Ob-!lq z<@$E&-ST^^eEe75dV6-gT0hr%86yLOgT%A@rffSbJys`hrEN*h4B3>stL^5s;=^wi g&s|iw)Kvo(M2taIqSDDzopr0N7o$O#lD@ literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-tl-l.png b/data/core/images/terrain/masks/7hex-tl-l.png new file mode 100644 index 0000000000000000000000000000000000000000..41941a039e89aaf27175d899d9b67da18c5dc84f GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvId?r>978JN-dt$pY%pLra^U?x@7+xbOPHo}_PyDYQU5w5>xCC@?8=4O zrX@?;)?K+URccp|b2tIPb#3piUf3&jE9+Hh1{F}P%l&Zsx91o+859^;Hg2xZjJDB; mZu&YQ_SP;qy4()*3_8%e^;Ll5`1PtTkc6kJpUXO@geCwrkb-Lf literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-tl-tr.png b/data/core/images/terrain/masks/7hex-tl-tr.png new file mode 100644 index 0000000000000000000000000000000000000000..0e09132f88e18abb96d6d42793333d07cf10ad8b GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIV(L~978JN-kf9PWKa-b*toquQ@i6p=LXdqb0Wf@8NTc(akEmMJMo-H z`V!+yl2qZ=%)R#(WE}&?0fXPmw;c_%?0C8U@|FYH?1xCo_S8fyqI@`uFs0N1HdPMx4JfW$tYlvi{2k^bi_&z{Kk#z`=Xs QZZb&1)78&qol`;+0P?_qXaE2J literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-tr-tl.png b/data/core/images/terrain/masks/7hex-tr-tl.png new file mode 100644 index 0000000000000000000000000000000000000000..592f00e6ef0eb7993c5946198717cc85b5d15c83 GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIr}|b978JN-kfXXWKiHau;JJL%l{N^7-r~k{GX$KM#_HrJp1X#0;SwD zWtJ9Bp%vrijD2s*J literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/masks/7hex-tr.png b/data/core/images/terrain/masks/7hex-tr.png new file mode 100644 index 0000000000000000000000000000000000000000..4e151d63425e45395d915f1ffe5a2063c7d85005 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2Q!c?Rkc(EQfvV}A+G=b{|7Qd4_&SUQj8@* ze!&b5&u*jvIS)Nu978JN-kfvfWiSw6QG9j3B=k=5Bv;0FdyH3px#X?CmnfnsbFazX zEpfBrqV#?B*G^wH{hIe>@7GITF8zAx%cZK!Dhj0c-?d!8$k31|Ve)^K{sXRA4NTX( z^%qp!(|&&G_0s8qHt(l8zx;ZsTXWv`Q?)=3p#ye1e(9XZ=lx4T5}vMpF6*2UngB?Z Bh>idN literal 0 HcmV?d00001 diff --git a/data/core/images/terrain/water/waves-mask-bl-br.png b/data/core/images/terrain/water/waves-mask-bl-br.png deleted file mode 100644 index 1e2f00da6ed2e66f737875021dd0bf0a64a33972..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 888 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq~iH)5S5QBJS<&!0g)w5^aIe zg|kgMC;#~`zpFG``h0W#iIcvDH_iw>Z;2L0v%zJtBpA|Pvy%Vh-n9RHTWXYe{N}!_M?ZSuS>MxX>bvlvS zC%FH}e9e9P`=1xv$oqb~nlsIDb+O#%I-B)|uXbFs?Wyc&+)N#sBNIbgPl@7dNe&A7gCyIH&9a*V=QjSAOaqyVL*NYM%GH z5|LdK%;kZC?JJ7qo$Zd5?@wmff9&(-4nyrNR>v2dH++^o$Ih<0yQzHXo%y0sbNwef z-cLH>9P(@L7IvrBu;-V9=jz|TQh9i>Sw`tO{-*6GXY_Bi;n`KRqF6k#e19A?_va+zuo&O*8J}AXXlmqW;{`I^G)~OENBmV{&GgY;iKx@ z^7PiS@_SQF(wf7bzkYnza(}sAR8T&S21V*i<@MWuKVnG zVZl{NpeU~qNZz73EFI`_pxR>#u2z}?T?cem@`YDELFuKyumB2z)QU=i1$!J<8v|9S zl!m3lwYe?4YH18p2r^1M;leAZLX9m}?2|yILHU~}TmhN}wQpYQ5~y83+0QyEP`f~~ z>53~s_5fY7_`)k2Zcmu=YGI0=f1L<1sp_wla}d+6l73gh;lgIWnxcvybL WvCu6`&Lm$0_rhb!m9^p7!m1tD$xkv7~*Yl|J`jegb%buxNI0dJ6>U7@E zmO2}%^kssNUBPL`sitA6!d0@Zi=>|~Z+UmzGP~-^X~&E_{g_Sa?49Pb+?=dEe~a1X zt-YpIC$`irV^xmpy{s}T>AnAEU$$7U^=bCWH9IXhe5dB_z2WhI|M8pBcVBK5&C#25 z^Y+)dCsO)>8t!;JQ~31N!u(gI^2^_aeUmKfoNr`r5|muH@{`}Edl`AEWh*{Ay>?x% z#V@q`^317MfQGGCEu0bX+>L3wP?=(5^xI3hI;CRQ%YhQAA8S><#BHkP{H-+8daBhK z&+}hDck#SC?>MzK=*iry8uN39E#i;;G&}d*pz2*te$YjzQpUr zo>x5=LViXWOfcb+O40-bRCi}J#4PA}4&Q?Ics?63O!sMIZ^?CIVm_gB2qo*dcaW-hhy!p>{J zuq#@uHTz81t!v+&8G)?3xsTsMi1TJ^sPiYg)adkMNdo%g~hO0+n*?U9l9T4Z>anGGbvk$T;PaV32;N_gO$Uu<1vx20Nu)Yn2Yr zq4jG)n(o~HcYN!Sd#X;qV^V>Zsur<^id~sGb@7?lnO6SI7v`T@Z&Yd~@N3^0t>EXG z0#)%vQ&$#qIhm)1fu&yu0lgJ`AX^Pcd9y5x)iNs86VixDdo_n?n|bi_tOXaYND9od zVs;9CUdiY_mvP}rV+E5^ww7h*{1hRbJ2+&%`an<)ig{`zq{yhROge<>GLzLn4WTqeik~fv}W7(D}H== zI-ix83Qm5W_k8W|r$JwDF1+wcX5)<~H^nyVY0X{sBWZ<7zguPAn&gT6m3B`pkI6hb zZ~nCD`j00kos4z9=!yN9@?6udd#PN=Zl%18OY^y8OYa?@G=K4(zi(^$b{+}&s&U@Q zc+cYP8_yiq__mYZ^Up8aXE8bzQ)@K0oM?}DvV6wBGZA9kf6XFZr0rN(YiRSd^4w=3 z?z*1hl<+&3R<7=7RlED6Xor5*UzyJ#I$zXI?d$L~yjtY^yQrcgKL3&T{qr{Wlj@GV ze{F56W1>9u-qEvnjtbSE{j6%Y|G4koj@JEKJ{)mg82am$eu>WK?EM$6hTY;lE4%%R z-L$%!r*v}{+J3xox8hNu)SoW}S6?Y~y?@8j{<9%b z3#V4SS>FD!GH2l>E?=pgOZ`8u+Tv9GNN~CP>ZxHFQ|JBHU3=l)k?eJsxX#9Cy^ZC& zlt1;{spprPz3R_>zO}zM{IRthm+!2{KvheWG+t+Fuf0(5XyJtwTbzRTJ>HnR@sijq zlTUre*R3e|e156ut@{19{{fY1$reUl4a#giCd}WOHgEeDC*jt4(Lib2y%{@!&Y1NX zWZW~LSyNKy1~1)v+EHrn(!GxtUicTt3SFe}0i5Ae5wU@Yn2+9Lmxq6G2HV}d2 zfIOhWwU@xkpuAo$|F8_8j{`GX-Ij_9RP?nwKxRVNU<@1?r-VkYDq~;0pLJ)w<33UZG%xo9t}sEXT_~?=by)^G+&gyS1)Iw&y1(YgXXQnGvz@aYtKHMDOxJtGVZHDEKcTPp z-Z`vg%}u`Y^NYmNec%22D}uLg_%69c%w*~DKd*599Kbbt2({kyei)@)s%S^Ki-Ur%?#@AEge0`;!1y|VYz&zbj^Uy8ag<($Cr z1;(#>%=UdxJiiR6bZ))FnGNe}FH}l?>51Z=b?N7{KI!`QdynTWvOB*XC~y0ZZ|e(=P*6 z=q&|W7V8JpxNFL_re!6TAj7Dj(D!w%v6uLzs{1{cOt+j{(0eI#OCOLF1+yU}>y~#- zW?t*pmWpo)tjb;64wUB3wq?tm5*PV;x})^c@XNn)FSxx7-C8FMRG_=|K1eF?^>&cd zrK*EK<%_Se0!`R|t?DMog8%*t1FKeRYzh2z-${BYYwi@WErC%$1J=WtnLw@kA)+8A zKgTT%-HgRsfSTRe;mZH>!$sLy;G)bxi@3oOUl@T}fkw_#glGjy$O}Mh`iW4ae=E;q U_mULZ{h*xe>FVdQ&MBb@0M)?dBme*a diff --git a/data/core/images/terrain/water/waves-mask-l-bl.png b/data/core/images/terrain/water/waves-mask-l-bl.png deleted file mode 100644 index 756292bd2163b4b1d04930d3d00635c4a28d8c23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 928 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq^;Q)5S5QBJS-i?>u2g5!MUa zVmZ_l)C>}tI&3#^tK~3l)G9loCh%yw1)K1H*{Bzhd7_;GDdCqyo_qMuonpLaS5>TE zu{O{+%0YvpPi2gWxzhr7-$KcbgaP z%NNR<99KIryKLLXnB$x0-rtsbSm#3jtYm>_x#mX@^v_uv zPkwto<6pt)g;U)N&3X#f=~qg|99i?|v+w+-H*&W^?--q%Wf5KW?b&<7$rb-PKL514 z5*aM6c;Wl3{e{hi6SscQVXD4%F4J0l?sJQC<&E=PKU|MokY7^&ZNE&^PEp0a*qxV; zqzm4eJmd0=kE(C?oVmR-$C>*}z=Z#QURmuw*fGJcZ0(%(otv|Kl>c<^nR&W>=IZwj zZ%=*B-ttMM=}xTSw4bMf?9MDvdwzSL>vPw9sYKcMyXQ=Iy>OPZRq- zdwzSgegDZ9Cr{6J$bS0y+&Y_muh^WmxwnM5E!b+rw00`DV8+@WhwN0AC~fvhVb@Lp zg&-nNHvxr|FGNW;UOUw;3|A!XaOo5WSa(sS3P|VEc}kfe-QPt#LCSY7_W){nm#OUx zR9E63Eg9symS^R%u(pt3ZRb@hrz&2(a%w_WR;q{TR-+}eq9lWIfri9ixpc~)V?*fW zQyDLOeSre&fht(4!o0N)ub8`C@QG*3w`}Y9TR->Aw)ibJ|2>oKYm?7bhiYE0?U{b) zJJ2AhU!_1@ZFS*54IAe2&;5Dh-13aqlR3VbaDUl#KGDs2|H_q91z&`l-UT{QKO1QF zFISK?_Uk~xzkw#)$yGlpdQaime3r!(*DeEHZtB?fzxpViEbxPMyY1=%38}MZK#DwF L{an^LB{Ts5fFzJz diff --git a/data/core/images/terrain/water/waves-mask-l-tl.png b/data/core/images/terrain/water/waves-mask-l-tl.png deleted file mode 100644 index 88a21fb29c92159f726f9ec49e11a5161dc23b53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 859 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq_}c)5S5QBJS;tjaedrBF7(E zM^5ey+h!JK*Vz9+_y>z!!_v75N7O^5wXGd}H=SG)EK}4LS=O1Tet2)4yv!njjXys= zH+t#_G!F+@pxxUrdD^13&=}+F-Ua8Qs+tsDr0ecoEBNK}q+PcbyIs&%y0flTUyKjnx{iEnFnJ%$kqm*BK7c7ne zskV1HvGG#rdef$VGZgv5e*$Iv7gzXa$7i$D3fd?4zK+Xg`CGYV*J`nAQjX=4CDuSK z{;z$~&r$}hS<{l7JBN}xQC z_2P4<7l`-Fh?uo+!(5lWr!qruTW3C z-!qSQ_3j;?BMT?*-&|bVW|MxV>0jVG-y4F@)s*i=zW-YAyzuo74!flJQy1)?&c5-Q z;LEE8(+kai{{DFF-sinl`&z}mZ2#2nGB;aRFy8$_{iD~%uD&?!RGO2;b6Mw<&;$Tcw}LAG diff --git a/data/core/images/terrain/water/waves-mask-r-br.png b/data/core/images/terrain/water/waves-mask-r-br.png deleted file mode 100644 index 32eddfc760ebeacb0f45a970dc3df367d42a5a4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfr06nr;B4qMcmt)x3g{sh`0u7 ze^o8j|Nnn^=A-Ua?N8?vG%XMjJ~`VkAz8gndvfceJTXR~UdjQ_?Eg*m*^b;h>;E^f z=ssDv+w=RsgB($3{NJyC+xENtY*}%AP2bPk?YEzq?vJm(Ar^I__RQ{*p{Vvj_-v(_1`Jn^}f?O@%hG-)NI|1w)&1=*Gud_ z?`!>Q0OSglU;8m(M*a2;pEWMYInTQ$ux)|l?%h7+XS46^KfcrV#POEeH}lqC-*~NQ zS@#c|1>9>-kH@=dWD9b3^xk&4KUy(HFiHo?Txm z{_S?njmTf;l-F%tu=eZCsP+YGw=Mws;8+y5RCeurI8!%c&DUCpD3A$K@|{x(7+hc` zH*4=!F_UXi7b0G>!qt3ra!g(el+Y6}xwgyULPR!@8!iD+#ROz?v-ECV2a-zxYAXT? zc(VZ&iz5qwbc+H7LVzlafGSQS3j~3*fCPkrDq?^t-~uo$$O2V2LK-(XUcsFzKZt8B VOt3tqdiEViji;-h%Q~loCIGk)WrF|! diff --git a/data/core/images/terrain/water/waves-mask-r-tr.png b/data/core/images/terrain/water/waves-mask-r-tr.png deleted file mode 100644 index 718694fc0b29edc18fc737181f2e74c1704f4453..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 841 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq_}T)5S5QBJS;7-~7t~0&RiT zg_lfxxishh|8K9fKv#3K#F9V}vDh6y;?7NMo5H)=eSJ^#kq`0AKm%|9iQ^0T4W8-y zHgBvc+kBy;QgnNsRYprpa^Gzed6O{9eBtuTH5VeD?#R94duQLz1shKlZZG`3Bl)vq z^3=zCg~xY%Kg-@5+E*=J-c_Apm$9bkj`O|tZOzBD(ofuF=?&F$-2R^jC~uwm1g!Af zh5o{FkdAXNzQ@)q7g#M*KD&EgB>#W5u*y@nkG(ZIBlU6l4*kOT)6bvp=vRG}toK>( z|D2USTaRf?cb^tI+3|6tWnOerTN~DL z_vSSn(<%o^&IUR;7U+_9YCy*!D@g?^pDtn&770|X%Gw($22^|&s2Hg6JkaMrVUUV+ z4yn~T8EZBHC5(Zl02P7MO9B;fgC#!k02M)WSGGZP10`(K9iu_IS#_WBycJy?le}(q zP5ICN(bFfS_eNgm2@k8RI;u7Q)4w&J{v}OaF7+w;m`;YF|5L%_>E6{Dr66s;Its(X zewO@P6BG9H!>;tyWr==ni|o>_r0&xY1iA9qwKGHl1tl z`4wAtZ@TKeXTSI)-zDFv>Di~)&)Zt|YQOJ)&1HY|?}_#D(?7%k9U;DbUEy@r zy3Xoz4c8?|X<^6u^~Apw{3s}z(tl$tNkednX2@PmJ9ALEgLP#gI_XS~e+eiE3p z@Aa;gxAQO8B<~8|HM_+Aa;^V&)4R`0=0E#A>0R_L`IqZ1%Ra9!|NZ>`$+R;4yT|kP zf34@P+4s1n{pb4$?`+y@q8(1Cz3|&cpyUR{*(Xx_W;V-v! zdRA>+wq?QnCxXwTf_E+B{8idAA#CThDPmt%zj0q1knMGx<*!lQg_5b+zL}2uJiKcI>+3**DSee48(v?Xb*ZUt#yc6q z>mZf2Q;$Y(1sYs3KX1>P;T_BC4;WZnfzUCq9` z45+?z&HDIE$IDia=B)~ky09fqaM$V}AiqlY)vBptCTl;tUf8Osn-O*Vm)gAwj#<}q z_e}?iChxqo@PEMOOHJQ$Y*PdIziI$gIz8!SO>=fW|1l(s>s1()rGs5|-F2EWWP|^``W%(6=k&d8!RG z(0#$qOUHL~d-;F<8VgJ%Yn4B6)IaV$9X?7ql-^`!Aj0n>0UfAjobQ_ z@Au|jt8bU~<+G@$>B3CgxCy^@D3$zsTA-zw;dI%miEpL+(&_^CuHqvyitYcN_Fvc{ zm-RbIBV+cpMd#w*J~h1ld52;~)cX1fmhrz<1XTdtQ`#~&-eceNb4z}H7u?<7?Rwzr zE1e7noyC2=`){vJmI7wtmc$?7y*y5rvTkg&*(CEu36!y^02-Kzw`@Id#O1yr$S_Y= KKbLh*2~7YH!1u5K diff --git a/data/core/images/terrain/water/waves-mask-tl-tr.png b/data/core/images/terrain/water/waves-mask-tl-tr.png deleted file mode 100644 index b11f039a19c393e01c0f03dbbc4560bcd1beae26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1002 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq{9Wr;B4qMcmt4j@iP2A`KV) zvSu&K5@iu|{QrM_kome@7fmuJo6M|e-Cg0Q$--{+xvls?kk@j(NzaczH9dRtbXL*1 zWW6LYLvus$#uv6bo>W_+NFtqp1@ue zDf1%rj8^@&v;P@#&lx_~6p30Im@(CDA^QpwuCUCOe z!ev_nQ4|W4c=->e<#<3Qj2XJi9;5|oR_HH#ut5;bYcHt>gKPk41}UiyAeLthHxOj+ zJQN<>6{v0kTLQFaY8bL5zYz{tBXe9>d+({L{LedUD<>>3T_Fl~v>eF&Tf<)b(w-YE zd%aBSuip9(>ppY6SK_`q$G5|2b&2&#FY60sFFn`Eh4IzfuKAasy~XSK=Ju5_k2SY= z#iuQOZGQq7em~FDW$oU={Px&mgNxGqKu6Eq%7hcesD<5_0`j;dZb2+YFFQDP~MXF0Cr`lbqSO8R0FFG}D`qXtF z1Ar3x-M9N(&s4s<*gyGS#Y(5$)5Bg#0nIFTUATVpxm>@}`5y}wgjU7Axpdv|bIrPy zAJ?}7WnZuPvT4Uli!_66Q$ug@t-VyaV*Wkv_1XKUhh^;kvS>&5zEkPjOz&4%0KIrR zsow5d4bVwtFDvCt<`4v?74S~3jU-Y^*B29 z-kQ&~>E-7nm4RXOj&JT}{bvEub7eD5ecCqHd5-Znt7uD^MFRwQiWjQw|?K-eML5zoW)t9iIgbBrFoQ;VQziX~a>sk1wUO6`N zqQv!M)sLG$9{r)VPilT|_2Y9hq{WY&S#e}_%+_}d6TPkoeU4caC%OIDZRNZz_g<8y z2R>TV!p61sQQWFa<$9at?!VaS_UZZ}Ar9UvJ1rJAS}B_Zq_?oWve|UOVXmOm3S%ec zQn|p41?PbBl0fNx9f*7nP}*GtBJT#2R_2Dt1GPUFY-M`|k_T%4d;+K+BoEYH>4IeZ zHiYpY>3V&Hu|RE`C6*}x4LZ1?Ug$) z>D;@K8z^}$Jaw^Y*)cZ|GdlJ0(Hj!06@VtxgqqFkox0H>)jAWKfiC$R7HMPP9Q@ofBr==(G3UaS#lN(qy*c;0f%Q$QJM5=eI?rXQ z>9jXL^w>eH-mud50<)}^uitdBQx2khZ@(dj@7&AbH~-5yflQid+RG}UXG7pEwUtoTEQ8wYF2OE>DFtt@1yqKQygdC)QG$FYIDYWH~4Ki7FJ}JJ`?03 zbN9y&4yJ}B&R2c4=?TbD`$FeFS5NtNci-|$t3ctfPRKjM*+|zJt$8Y?j}1R6d7sF=@v~aQ|Nrh&9K9zt zUU=SjjcxwazlAscUaknt06Kc3bBNGJTcJ|_djv4?XT(OV1Fkc$hHu3ay&(qWYnd{0bxY4PJ|^3f~`&bP$bvVG+^>45%Rf zj}lXzr%GCGGGKB1{o`c&=YH2^Dh5?clQ+&)?E16(uGJPs28Kk16aRvhUr%6}WPOz} sZp%91Ei2k*Y_|Wj@MgCJu+*UjkXrXGaodt&*Cvo*p00i_>zopr01QGk@c;k- diff --git a/data/core/images/terrain/water/waves-mask-tr-tl.png b/data/core/images/terrain/water/waves-mask-tr-tl.png deleted file mode 100644 index 98731dfc9d4024c7bef6f36d2d89ec16025f3349..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 972 zcmeAS@N?(olHy`uVBq!ia0vp^TY&fm2OE%d`h8NEfq{9lr;B4qMcmsvzS&oDM2dl!4>_Mgwr|Nj5}^ZWLn@7b4+mlkf{;eE&OUG|;lJNgUXf3`bP z+x1&$d$;xR*vGea*u7tWBX1sCZQS(3HD?z7>$rWqR{pM{ef`P(<+J;4EQkzUxOvC& zHDB^fp2hP0n$n#2c-J1g^9ur>GqLqrNt?XdGs$uBIVkhbg241vx4FDhrT?Ov!L(V% zmCBz$1zcdYf7U}3=3H3u`43!l&n&nJHuV=)Y=-dk?K7_21eymiXPzOP_ncp;72saPKbUBGFR@x@7fO^1|uRRB3!g;+`=f5Xy7W;A)sD0(C zb8KtRgkHV5pm*0QE9ouny-`4QUn*0t-CVHp-_4r~_AXn!;M_fD?av>MCj2Zl%P8eD zwX>GqGXLg|Dsn+r8oo}0Ju<^0MrJCWG* z=5J}qOM$xg-2A}vHr;Gj;N0&^uisp7_2GhfmuWW3rr$?l>eoI??(%N_a+|B29)O|M4+o%`o1%VFiX*<0t?SU+FAD{{weoz}E3_jB*W-ZQhm|94d> z-%pF5ZeF|p0WCV-+vE0cr)22wKTl?apIcDtxZ~{kSoQs%Ue7X@{QS%9?ZoD1=11%1 z^!zm2bMr*BV(YTmJiBCj_ngl5uDKGB@#|xU`gQSu^j5XwmRGjlT=KGEx~#G9olhC_ te(aFs-@Zzpi8spNU&a|=o}vo)!}9f_^{d92_1z%jJYD@<);T3K0RULw;ZXnp diff --git a/data/core/terrain-graphics/new-macros.cfg b/data/core/terrain-graphics/new-macros.cfg index f3a483456ff6..539583fce8c1 100644 --- a/data/core/terrain-graphics/new-macros.cfg +++ b/data/core/terrain-graphics/new-macros.cfg @@ -771,14 +771,7 @@ rotations=tr,r,br,bl,l,tl [image] - name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R5.png):200 - random_start=no - layer={LAYER} - center=90,144 - base=90,144 - [/image] - [image] - name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R1.png):200 + name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200 random_start=no layer={LAYER} center=90,144 @@ -809,7 +802,7 @@ rotations=tr,r,br,bl,l,tl [image] - name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R5.png):200 + name={IMAGESTEM}-convex-A[01~13].png~MASK(terrain/masks/7hex-@R0-@R5.png):200 random_start=no layer={LAYER} center=90,144 @@ -841,14 +834,7 @@ rotations=tr,r,br,bl,l,tl [image] - name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R5.png):200 - random_start=no - layer={LAYER} - center=90,144 - base=90,144 - [/image] - [image] - name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R1.png):200 + name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0.png):200 random_start=no layer={LAYER} center=90,144 @@ -879,7 +865,7 @@ rotations=tr,r,br,bl,l,tl [image] - name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/{IMAGESTEM}-mask-@R0-@R5.png):200 + name={IMAGESTEM}-concave-A[01~13].png~MASK(terrain/masks/7hex-@R0-@R5.png):200 random_start=no layer={LAYER} center=90,144 From 04d510a91cb9d9ff97a56b09690ca9499c82ab30 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 23:30:47 +1100 Subject: [PATCH 08/57] gui2: dropped repeating buttons from scrollbars --- .../default/macros/horizontal_scrollbar.cfg | 41 ------------- .../gui/default/macros/vertical_scrollbar.cfg | 57 ------------------- 2 files changed, 98 deletions(-) diff --git a/data/gui/default/macros/horizontal_scrollbar.cfg b/data/gui/default/macros/horizontal_scrollbar.cfg index 4f0d2d70ae77..3762fff6f4c1 100644 --- a/data/gui/default/macros/horizontal_scrollbar.cfg +++ b/data/gui/default/macros/horizontal_scrollbar.cfg @@ -8,16 +8,6 @@ horizontal_grow = "true" [row] - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_up" - definition = "left_arrow" - [/repeating_button] - - [/column] - [column] grow_factor = 1 horizontal_grow = "true" @@ -29,16 +19,6 @@ horizontal_grow = "true" [/column] - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_down" - definition = "right_arrow" - [/repeating_button] - - [/column] - [/row] [/grid] @@ -51,16 +31,6 @@ horizontal_grow = "true" [row] - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_up" - definition = "left_arrow_transparent" - [/repeating_button] - - [/column] - [column] grow_factor = 1 horizontal_grow = "true" @@ -72,18 +42,7 @@ horizontal_grow = "true" [/column] - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_down" - definition = "right_arrow_transparent" - [/repeating_button] - - [/column] - [/row] [/grid] #enddef - diff --git a/data/gui/default/macros/vertical_scrollbar.cfg b/data/gui/default/macros/vertical_scrollbar.cfg index 704c8234f08b..cb4ea4e19654 100644 --- a/data/gui/default/macros/vertical_scrollbar.cfg +++ b/data/gui/default/macros/vertical_scrollbar.cfg @@ -6,20 +6,6 @@ vertical_grow = "true" [grid] id = "_vertical_scrollbar_grid" - [row] - - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_up" - definition = "up_arrow" - [/repeating_button] - - [/column] - - [/row] - [row] grow_factor = 1 @@ -35,20 +21,6 @@ vertical_grow = "true" [/row] - [row] - - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_down" - definition = "down_arrow" - [/repeating_button] - - [/column] - - [/row] - [/grid] #enddef @@ -57,20 +29,6 @@ vertical_grow = "true" [grid] id = "_vertical_scrollbar_grid" - [row] - - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_up" - definition = "up_arrow_transparent" - [/repeating_button] - - [/column] - - [/row] - [row] grow_factor = 1 @@ -86,20 +44,5 @@ vertical_grow = "true" [/row] - [row] - - [column] - - # note we want a special button definition for this later. - [repeating_button] - id = "_half_page_down" - definition = "down_arrow_transparent" - [/repeating_button] - - [/column] - - [/row] - [/grid] #enddef - From 5aa86c42f004b1da191c645b9d79c5326b21b67e Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 23:35:23 +1100 Subject: [PATCH 09/57] Moved scrollbar images to their own folder --- .../default/widget/horizontal_scrollbar_default.cfg | 12 ++++++------ .../default/widget/vertical_scrollbar_default.cfg | 12 ++++++------ .../{ => scrollbars}/scrollbottom-active.png | Bin .../scrollbottom-minimal-active.png | Bin .../scrollbottom-minimal-pressed.png | Bin .../{ => scrollbars}/scrollbottom-minimal.png | Bin .../{ => scrollbars}/scrollbottom-pressed.png | Bin images/buttons/{ => scrollbars}/scrollbottom.png | Bin .../scrollgroove-bottom-minimal.png | Bin .../{ => scrollbars}/scrollgroove-bottom.png | Bin .../{ => scrollbars}/scrollgroove-horizontal.png | Bin .../buttons/{ => scrollbars}/scrollgroove-left.png | Bin .../{ => scrollbars}/scrollgroove-mid-minimal.png | Bin .../buttons/{ => scrollbars}/scrollgroove-mid.png | Bin .../buttons/{ => scrollbars}/scrollgroove-right.png | Bin .../{ => scrollbars}/scrollgroove-top-minimal.png | Bin .../buttons/{ => scrollbars}/scrollgroove-top.png | Bin .../{ => scrollbars}/scrollhorizontal-active.png | Bin .../{ => scrollbars}/scrollhorizontal-pressed.png | Bin .../buttons/{ => scrollbars}/scrollhorizontal.png | Bin .../buttons/{ => scrollbars}/scrollleft-active.png | Bin .../buttons/{ => scrollbars}/scrollleft-pressed.png | Bin images/buttons/{ => scrollbars}/scrollleft.png | Bin .../buttons/{ => scrollbars}/scrollmid-active.png | Bin .../{ => scrollbars}/scrollmid-minimal-active.png | Bin .../{ => scrollbars}/scrollmid-minimal-pressed.png | Bin .../buttons/{ => scrollbars}/scrollmid-minimal.png | Bin .../buttons/{ => scrollbars}/scrollmid-pressed.png | Bin images/buttons/{ => scrollbars}/scrollmid.png | Bin .../buttons/{ => scrollbars}/scrollright-active.png | Bin .../{ => scrollbars}/scrollright-pressed.png | Bin images/buttons/{ => scrollbars}/scrollright.png | Bin .../buttons/{ => scrollbars}/scrolltop-active.png | Bin .../{ => scrollbars}/scrolltop-minimal-active.png | Bin .../{ => scrollbars}/scrolltop-minimal-pressed.png | Bin .../buttons/{ => scrollbars}/scrolltop-minimal.png | Bin .../buttons/{ => scrollbars}/scrolltop-pressed.png | Bin images/buttons/{ => scrollbars}/scrolltop.png | Bin 38 files changed, 12 insertions(+), 12 deletions(-) rename images/buttons/{ => scrollbars}/scrollbottom-active.png (100%) rename images/buttons/{ => scrollbars}/scrollbottom-minimal-active.png (100%) rename images/buttons/{ => scrollbars}/scrollbottom-minimal-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollbottom-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrollbottom-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollbottom.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-bottom-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-bottom.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-horizontal.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-left.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-mid-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-mid.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-right.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-top-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrollgroove-top.png (100%) rename images/buttons/{ => scrollbars}/scrollhorizontal-active.png (100%) rename images/buttons/{ => scrollbars}/scrollhorizontal-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollhorizontal.png (100%) rename images/buttons/{ => scrollbars}/scrollleft-active.png (100%) rename images/buttons/{ => scrollbars}/scrollleft-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollleft.png (100%) rename images/buttons/{ => scrollbars}/scrollmid-active.png (100%) rename images/buttons/{ => scrollbars}/scrollmid-minimal-active.png (100%) rename images/buttons/{ => scrollbars}/scrollmid-minimal-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollmid-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrollmid-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollmid.png (100%) rename images/buttons/{ => scrollbars}/scrollright-active.png (100%) rename images/buttons/{ => scrollbars}/scrollright-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrollright.png (100%) rename images/buttons/{ => scrollbars}/scrolltop-active.png (100%) rename images/buttons/{ => scrollbars}/scrolltop-minimal-active.png (100%) rename images/buttons/{ => scrollbars}/scrolltop-minimal-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrolltop-minimal.png (100%) rename images/buttons/{ => scrollbars}/scrolltop-pressed.png (100%) rename images/buttons/{ => scrollbars}/scrolltop.png (100%) diff --git a/data/gui/default/widget/horizontal_scrollbar_default.cfg b/data/gui/default/widget/horizontal_scrollbar_default.cfg index 0f5397058dff..4a9c720daf80 100644 --- a/data/gui/default/widget/horizontal_scrollbar_default.cfg +++ b/data/gui/default/widget/horizontal_scrollbar_default.cfg @@ -14,7 +14,7 @@ # 4 pixels wide x = 0 y = 0 - name = "buttons/scrollgroove-left.png{IPF}" + name = "buttons/scrollbars/scrollgroove-left.png{IPF}" [/image] [image] @@ -24,14 +24,14 @@ , 0, width - {GROOVE_LEFT} - {GROOVE_RIGHT}))" h = 0 resize_mode = "stretch" - name = "buttons/scrollgroove-horizontal.png{IPF}" + name = "buttons/scrollbars/scrollgroove-horizontal.png{IPF}" [/image] [image] # 5 pixels wide x = "(width - {GROOVE_RIGHT})" y = 0 - name = "buttons/scrollgroove-right.png{IPF}" + name = "buttons/scrollbars/scrollgroove-right.png{IPF}" [/image] # @@ -42,7 +42,7 @@ # 5 pixels wide x = "(positioner_offset)" y = 0 - name = "buttons/scrollleft{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrollleft{IMAGE_SUFFIX}{IPF}" [/image] [image] @@ -52,14 +52,14 @@ if(positioner_length - {POSITIONER_LEFT} - {POSITIONER_RIGHT} < 0 , 0, positioner_length - {POSITIONER_LEFT} - {POSITIONER_RIGHT}))" resize_mode = "stretch" - name = "buttons/scrollhorizontal{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrollhorizontal{IMAGE_SUFFIX}{IPF}" [/image] [image] # 5 pixels wide x = "(positioner_offset + positioner_length - {POSITIONER_RIGHT})" y = 0 - name = "buttons/scrollright{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrollright{IMAGE_SUFFIX}{IPF}" [/image] [/draw] diff --git a/data/gui/default/widget/vertical_scrollbar_default.cfg b/data/gui/default/widget/vertical_scrollbar_default.cfg index 3c1cfb448234..0d95664e2927 100644 --- a/data/gui/default/widget/vertical_scrollbar_default.cfg +++ b/data/gui/default/widget/vertical_scrollbar_default.cfg @@ -14,7 +14,7 @@ # 4 pixels high x = 0 y = 0 - name = "buttons/scrollgroove-top.png{IPF}" + name = "buttons/scrollbars/scrollgroove-top.png{IPF}" [/image] [image] @@ -23,14 +23,14 @@ h = "(if(height - {GROOVE_TOP} - {GROOVE_BOTTOM} < 0 , 0, height - {GROOVE_TOP} - {GROOVE_BOTTOM}))" resize_mode = "stretch" - name = "buttons/scrollgroove-mid.png{IPF}" + name = "buttons/scrollbars/scrollgroove-mid.png{IPF}" [/image] [image] # 5 pixels high x = 0 y = "(height - {GROOVE_BOTTOM})" - name = "buttons/scrollgroove-bottom.png{IPF}" + name = "buttons/scrollbars/scrollgroove-bottom.png{IPF}" [/image] # @@ -41,7 +41,7 @@ # 5 pixels high x = 0 y = "(positioner_offset)" - name = "buttons/scrolltop{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrolltop{IMAGE_SUFFIX}{IPF}" [/image] [image] @@ -51,14 +51,14 @@ if(positioner_length - {POSITIONER_TOP} - {POSITIONER_BOTTOM} < 0 , 0, positioner_length - {POSITIONER_TOP} - {POSITIONER_BOTTOM}))" resize_mode = "stretch" - name = "buttons/scrollmid{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrollmid{IMAGE_SUFFIX}{IPF}" [/image] [image] # 5 pixels high x = 0 y = "(positioner_offset + positioner_length - {POSITIONER_BOTTOM})" - name = "buttons/scrollbottom{IMAGE_SUFFIX}{IPF}" + name = "buttons/scrollbars/scrollbottom{IMAGE_SUFFIX}{IPF}" [/image] [/draw] diff --git a/images/buttons/scrollbottom-active.png b/images/buttons/scrollbars/scrollbottom-active.png similarity index 100% rename from images/buttons/scrollbottom-active.png rename to images/buttons/scrollbars/scrollbottom-active.png diff --git a/images/buttons/scrollbottom-minimal-active.png b/images/buttons/scrollbars/scrollbottom-minimal-active.png similarity index 100% rename from images/buttons/scrollbottom-minimal-active.png rename to images/buttons/scrollbars/scrollbottom-minimal-active.png diff --git a/images/buttons/scrollbottom-minimal-pressed.png b/images/buttons/scrollbars/scrollbottom-minimal-pressed.png similarity index 100% rename from images/buttons/scrollbottom-minimal-pressed.png rename to images/buttons/scrollbars/scrollbottom-minimal-pressed.png diff --git a/images/buttons/scrollbottom-minimal.png b/images/buttons/scrollbars/scrollbottom-minimal.png similarity index 100% rename from images/buttons/scrollbottom-minimal.png rename to images/buttons/scrollbars/scrollbottom-minimal.png diff --git a/images/buttons/scrollbottom-pressed.png b/images/buttons/scrollbars/scrollbottom-pressed.png similarity index 100% rename from images/buttons/scrollbottom-pressed.png rename to images/buttons/scrollbars/scrollbottom-pressed.png diff --git a/images/buttons/scrollbottom.png b/images/buttons/scrollbars/scrollbottom.png similarity index 100% rename from images/buttons/scrollbottom.png rename to images/buttons/scrollbars/scrollbottom.png diff --git a/images/buttons/scrollgroove-bottom-minimal.png b/images/buttons/scrollbars/scrollgroove-bottom-minimal.png similarity index 100% rename from images/buttons/scrollgroove-bottom-minimal.png rename to images/buttons/scrollbars/scrollgroove-bottom-minimal.png diff --git a/images/buttons/scrollgroove-bottom.png b/images/buttons/scrollbars/scrollgroove-bottom.png similarity index 100% rename from images/buttons/scrollgroove-bottom.png rename to images/buttons/scrollbars/scrollgroove-bottom.png diff --git a/images/buttons/scrollgroove-horizontal.png b/images/buttons/scrollbars/scrollgroove-horizontal.png similarity index 100% rename from images/buttons/scrollgroove-horizontal.png rename to images/buttons/scrollbars/scrollgroove-horizontal.png diff --git a/images/buttons/scrollgroove-left.png b/images/buttons/scrollbars/scrollgroove-left.png similarity index 100% rename from images/buttons/scrollgroove-left.png rename to images/buttons/scrollbars/scrollgroove-left.png diff --git a/images/buttons/scrollgroove-mid-minimal.png b/images/buttons/scrollbars/scrollgroove-mid-minimal.png similarity index 100% rename from images/buttons/scrollgroove-mid-minimal.png rename to images/buttons/scrollbars/scrollgroove-mid-minimal.png diff --git a/images/buttons/scrollgroove-mid.png b/images/buttons/scrollbars/scrollgroove-mid.png similarity index 100% rename from images/buttons/scrollgroove-mid.png rename to images/buttons/scrollbars/scrollgroove-mid.png diff --git a/images/buttons/scrollgroove-right.png b/images/buttons/scrollbars/scrollgroove-right.png similarity index 100% rename from images/buttons/scrollgroove-right.png rename to images/buttons/scrollbars/scrollgroove-right.png diff --git a/images/buttons/scrollgroove-top-minimal.png b/images/buttons/scrollbars/scrollgroove-top-minimal.png similarity index 100% rename from images/buttons/scrollgroove-top-minimal.png rename to images/buttons/scrollbars/scrollgroove-top-minimal.png diff --git a/images/buttons/scrollgroove-top.png b/images/buttons/scrollbars/scrollgroove-top.png similarity index 100% rename from images/buttons/scrollgroove-top.png rename to images/buttons/scrollbars/scrollgroove-top.png diff --git a/images/buttons/scrollhorizontal-active.png b/images/buttons/scrollbars/scrollhorizontal-active.png similarity index 100% rename from images/buttons/scrollhorizontal-active.png rename to images/buttons/scrollbars/scrollhorizontal-active.png diff --git a/images/buttons/scrollhorizontal-pressed.png b/images/buttons/scrollbars/scrollhorizontal-pressed.png similarity index 100% rename from images/buttons/scrollhorizontal-pressed.png rename to images/buttons/scrollbars/scrollhorizontal-pressed.png diff --git a/images/buttons/scrollhorizontal.png b/images/buttons/scrollbars/scrollhorizontal.png similarity index 100% rename from images/buttons/scrollhorizontal.png rename to images/buttons/scrollbars/scrollhorizontal.png diff --git a/images/buttons/scrollleft-active.png b/images/buttons/scrollbars/scrollleft-active.png similarity index 100% rename from images/buttons/scrollleft-active.png rename to images/buttons/scrollbars/scrollleft-active.png diff --git a/images/buttons/scrollleft-pressed.png b/images/buttons/scrollbars/scrollleft-pressed.png similarity index 100% rename from images/buttons/scrollleft-pressed.png rename to images/buttons/scrollbars/scrollleft-pressed.png diff --git a/images/buttons/scrollleft.png b/images/buttons/scrollbars/scrollleft.png similarity index 100% rename from images/buttons/scrollleft.png rename to images/buttons/scrollbars/scrollleft.png diff --git a/images/buttons/scrollmid-active.png b/images/buttons/scrollbars/scrollmid-active.png similarity index 100% rename from images/buttons/scrollmid-active.png rename to images/buttons/scrollbars/scrollmid-active.png diff --git a/images/buttons/scrollmid-minimal-active.png b/images/buttons/scrollbars/scrollmid-minimal-active.png similarity index 100% rename from images/buttons/scrollmid-minimal-active.png rename to images/buttons/scrollbars/scrollmid-minimal-active.png diff --git a/images/buttons/scrollmid-minimal-pressed.png b/images/buttons/scrollbars/scrollmid-minimal-pressed.png similarity index 100% rename from images/buttons/scrollmid-minimal-pressed.png rename to images/buttons/scrollbars/scrollmid-minimal-pressed.png diff --git a/images/buttons/scrollmid-minimal.png b/images/buttons/scrollbars/scrollmid-minimal.png similarity index 100% rename from images/buttons/scrollmid-minimal.png rename to images/buttons/scrollbars/scrollmid-minimal.png diff --git a/images/buttons/scrollmid-pressed.png b/images/buttons/scrollbars/scrollmid-pressed.png similarity index 100% rename from images/buttons/scrollmid-pressed.png rename to images/buttons/scrollbars/scrollmid-pressed.png diff --git a/images/buttons/scrollmid.png b/images/buttons/scrollbars/scrollmid.png similarity index 100% rename from images/buttons/scrollmid.png rename to images/buttons/scrollbars/scrollmid.png diff --git a/images/buttons/scrollright-active.png b/images/buttons/scrollbars/scrollright-active.png similarity index 100% rename from images/buttons/scrollright-active.png rename to images/buttons/scrollbars/scrollright-active.png diff --git a/images/buttons/scrollright-pressed.png b/images/buttons/scrollbars/scrollright-pressed.png similarity index 100% rename from images/buttons/scrollright-pressed.png rename to images/buttons/scrollbars/scrollright-pressed.png diff --git a/images/buttons/scrollright.png b/images/buttons/scrollbars/scrollright.png similarity index 100% rename from images/buttons/scrollright.png rename to images/buttons/scrollbars/scrollright.png diff --git a/images/buttons/scrolltop-active.png b/images/buttons/scrollbars/scrolltop-active.png similarity index 100% rename from images/buttons/scrolltop-active.png rename to images/buttons/scrollbars/scrolltop-active.png diff --git a/images/buttons/scrolltop-minimal-active.png b/images/buttons/scrollbars/scrolltop-minimal-active.png similarity index 100% rename from images/buttons/scrolltop-minimal-active.png rename to images/buttons/scrollbars/scrolltop-minimal-active.png diff --git a/images/buttons/scrolltop-minimal-pressed.png b/images/buttons/scrollbars/scrolltop-minimal-pressed.png similarity index 100% rename from images/buttons/scrolltop-minimal-pressed.png rename to images/buttons/scrollbars/scrolltop-minimal-pressed.png diff --git a/images/buttons/scrolltop-minimal.png b/images/buttons/scrollbars/scrolltop-minimal.png similarity index 100% rename from images/buttons/scrolltop-minimal.png rename to images/buttons/scrollbars/scrolltop-minimal.png diff --git a/images/buttons/scrolltop-pressed.png b/images/buttons/scrollbars/scrolltop-pressed.png similarity index 100% rename from images/buttons/scrolltop-pressed.png rename to images/buttons/scrollbars/scrolltop-pressed.png diff --git a/images/buttons/scrolltop.png b/images/buttons/scrollbars/scrolltop.png similarity index 100% rename from images/buttons/scrolltop.png rename to images/buttons/scrollbars/scrolltop.png From b57def51302d70220dfe7ecee5ca3e7254cdcfe8 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Mon, 22 Feb 2016 23:48:53 +1100 Subject: [PATCH 10/57] ttitle_screen: use a standard label definition for version label Since this label no longer has a special background, the custom definition isn't necessary anymore. --- .../widget/label_title_screen_revision.cfg | 87 ------------------- data/gui/default/window/title_screen.cfg | 2 +- 2 files changed, 1 insertion(+), 88 deletions(-) delete mode 100644 data/gui/default/widget/label_title_screen_revision.cfg diff --git a/data/gui/default/widget/label_title_screen_revision.cfg b/data/gui/default/widget/label_title_screen_revision.cfg deleted file mode 100644 index d12d2dc1e133..000000000000 --- a/data/gui/default/widget/label_title_screen_revision.cfg +++ /dev/null @@ -1,87 +0,0 @@ -#textdomain wesnoth-lib -### -### Definition of a label. -### -### Defines the following revision label for the title screen. - -#define _GUI_RESOLUTION RESOLUTION FONT_SIZE FONT_COLOR_ENABLED FONT_COLOR_DISABLED Y_POSITION - [resolution] - - {RESOLUTION} - - min_width = 0 - min_height = 0 - - default_width = 0 - default_height = 0 - - max_width = 0 - max_height = 0 - - text_font_size = {FONT_SIZE} - - [state_enabled] - - [draw] - - [text] - x = 0 - y = 0 - w = "(width)" - h = "(height)" - maximum_width = "(width)" - font_size = {FONT_SIZE} - text_alignment = "(text_alignment)" - color = {FONT_COLOR_ENABLED} - text = "(text)" - text_markup = "(text_markup)" - [/text] - - [/draw] - - [/state_enabled] - - [state_disabled] - - [draw] - - [text] - x = 0 - y = 0 - w = "(width)" - h = "(height)" - maximum_width = "(width)" - font_size = {FONT_SIZE} - text_alignment = "(text_alignment)" - color = {FONT_COLOR_DISABLED} - text = "(text)" - text_markup = "(text_markup)" - [/text] - - [/draw] - - [/state_disabled] - - [/resolution] -#enddef - -#define _GUI_DEFINITION ID DESCRIPTION FONT_SIZE FONT_COLOR Y_POSITION -[label_definition] - id = {ID} - description = {DESCRIPTION} - - {_GUI_RESOLUTION - ({GUI_NORMAL__RESOLUTION}) - ({GUI_NORMAL__FONT_SIZE__{FONT_SIZE}}) - ({GUI__FONT_COLOR_ENABLED__{FONT_COLOR}}) - ({GUI__FONT_COLOR_DISABLED__{FONT_COLOR}}) - ({Y_POSITION}) - } - -[/label_definition] -#enddef - -{_GUI_DEFINITION "title_screen_revision" "label used for the revision number in the title screen" SMALL DEFAULT ({GUI__TEXT_VERTICALLY_CENTRED})} - -#undef _GUI_DEFINITION -#undef _GUI_RESOLUTION diff --git a/data/gui/default/window/title_screen.cfg b/data/gui/default/window/title_screen.cfg index 818ec634802a..689c9e70d22c 100644 --- a/data/gui/default/window/title_screen.cfg +++ b/data/gui/default/window/title_screen.cfg @@ -483,7 +483,7 @@ border_size = 5 [label] id = "revision_number" - definition = "title_screen_revision" + definition = "default_small" [/label] [/column] From c0254f6bcae1b4174a0a4bd5e3e39d1fcc11b7bb Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 00:45:18 +1100 Subject: [PATCH 11/57] tcontrol: add text_alignment setter to set_members --- src/gui/widgets/control.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/widgets/control.cpp b/src/gui/widgets/control.cpp index 20279b97e1fb..ab591ee0992d 100644 --- a/src/gui/widgets/control.cpp +++ b/src/gui/widgets/control.cpp @@ -126,6 +126,11 @@ void tcontrol::set_members(const string_map& data) if(itor != data.end()) { set_use_markup(utils::string_bool(itor->second)); } + + itor = data.find("text_alignment"); + if(itor != data.end()) { + set_text_alignment(decode_text_alignment(itor->second)); + } } bool tcontrol::disable_click_dismiss() const From e8c3fdb2381c2b2cf4dc83b3e7583268c8e36f0b Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 00:47:54 +1100 Subject: [PATCH 12/57] tcampaign_dialog: add support for setting alignment of description text from WML --- data/gui/default/window/campaign_dialog.cfg | 6 ++++-- src/gui/dialogs/campaign_selection.cpp | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/gui/default/window/campaign_dialog.cfg b/data/gui/default/window/campaign_dialog.cfg index a2dfaf50fabd..cf44f7c198f7 100644 --- a/data/gui/default/window/campaign_dialog.cfg +++ b/data/gui/default/window/campaign_dialog.cfg @@ -14,6 +14,7 @@ vertical_placement = "center" horizontal_placement = "center" maximum_height = 600 + maximum_width = 1000 [linked_group] id = "icon_area" @@ -417,6 +418,7 @@ vertical_alignment = "top" [scrollbar_panel] + horizontal_scrollbar_mode = "never" [definition] @@ -426,14 +428,14 @@ [column] border = "all" border_size = 5 - horizontal_alignment = "left" + horizontal_grow = "true" vertical_alignment = "top" [label] id = "description" definition = "default" - characters_per_line = 66 + wrap = "true" [/label] [/column] diff --git a/src/gui/dialogs/campaign_selection.cpp b/src/gui/dialogs/campaign_selection.cpp index 8a88cb4acd87..480de20c0ca4 100644 --- a/src/gui/dialogs/campaign_selection.cpp +++ b/src/gui/dialogs/campaign_selection.cpp @@ -163,6 +163,11 @@ void tcampaign_selection::pre_show(CVideo& video, twindow& window) detail_item["label"] = campaign["description"]; detail_item["use_markup"] = "true"; + + if(!campaign["description_alignment"].empty()) { + detail_item["text_alignment"] = campaign["description_alignment"]; + } + detail_page.insert(std::make_pair("description", detail_item)); detail_item["label"] = campaign["image"]; From 9cdc3bcbd2a39c78fc2515af24810283763cb431 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 00:48:27 +1100 Subject: [PATCH 13/57] SoF: center description poem --- data/campaigns/Sceptre_of_Fire/_main.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/campaigns/Sceptre_of_Fire/_main.cfg b/data/campaigns/Sceptre_of_Fire/_main.cfg index 1e5a11956dc6..e50b60088edf 100644 --- a/data/campaigns/Sceptre_of_Fire/_main.cfg +++ b/data/campaigns/Sceptre_of_Fire/_main.cfg @@ -31,6 +31,8 @@ Their tale I now relate... " + _"(Expert level, 9 scenarios.)" + description_alignment = "center" + [about] title = _ "Campaign Design" [entry] From 499cadc37b99934ec8352a337a5f55292efe0775 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 00:50:55 +1100 Subject: [PATCH 14/57] Update GUI1 scrollbar image paths post-5aa86c42f004 --- src/widgets/scrollbar.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/widgets/scrollbar.cpp b/src/widgets/scrollbar.cpp index 55a4f6b7f969..385d246691e0 100644 --- a/src/widgets/scrollbar.cpp +++ b/src/widgets/scrollbar.cpp @@ -27,21 +27,21 @@ #include namespace { - const std::string scrollbar_top = "buttons/scrolltop.png"; - const std::string scrollbar_bottom = "buttons/scrollbottom.png"; - const std::string scrollbar_mid = "buttons/scrollmid.png"; + const std::string scrollbar_top = "buttons/scrollbars/scrolltop.png"; + const std::string scrollbar_bottom = "buttons/scrollbars/scrollbottom.png"; + const std::string scrollbar_mid = "buttons/scrollbars/scrollmid.png"; - const std::string scrollbar_top_hl = "buttons/scrolltop-active.png"; - const std::string scrollbar_bottom_hl = "buttons/scrollbottom-active.png"; - const std::string scrollbar_mid_hl = "buttons/scrollmid-active.png"; + const std::string scrollbar_top_hl = "buttons/scrollbars/scrolltop-active.png"; + const std::string scrollbar_bottom_hl = "buttons/scrollbars/scrollbottom-active.png"; + const std::string scrollbar_mid_hl = "buttons/scrollbars/scrollmid-active.png"; - const std::string scrollbar_top_pressed = "buttons/scrolltop-pressed.png"; - const std::string scrollbar_bottom_pressed = "buttons/scrollbottom-pressed.png"; - const std::string scrollbar_mid_pressed = "buttons/scrollmid-pressed.png"; + const std::string scrollbar_top_pressed = "buttons/scrollbars/scrolltop-pressed.png"; + const std::string scrollbar_bottom_pressed = "buttons/scrollbars/scrollbottom-pressed.png"; + const std::string scrollbar_mid_pressed = "buttons/scrollbars/scrollmid-pressed.png"; - const std::string groove_top = "buttons/scrollgroove-top.png"; - const std::string groove_mid = "buttons/scrollgroove-mid.png"; - const std::string groove_bottom = "buttons/scrollgroove-bottom.png"; + const std::string groove_top = "buttons/scrollbars/scrollgroove-top.png"; + const std::string groove_mid = "buttons/scrollbars/scrollgroove-mid.png"; + const std::string groove_bottom = "buttons/scrollbars/scrollgroove-bottom.png"; } From cc5dc5b382ea74aaff291de1fdc6e3e888c0f711 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Mon, 22 Feb 2016 14:56:29 +0100 Subject: [PATCH 15/57] attempt to fix replays of mp games not beeing loaded correctly. https://gna.org/bugs/?24439 --- src/game_initialization/playcampaign.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_initialization/playcampaign.cpp b/src/game_initialization/playcampaign.cpp index cb7795da5694..8051f178f352 100644 --- a/src/game_initialization/playcampaign.cpp +++ b/src/game_initialization/playcampaign.cpp @@ -284,7 +284,7 @@ LEVEL_RESULT campaign_controller::play_game() state_.expand_mp_options(); #if !defined(ALWAYS_USE_MP_CONTROLLER) - if (game_type != game_classification::CAMPAIGN_TYPE::MULTIPLAYER) { + if (game_type != game_classification::CAMPAIGN_TYPE::MULTIPLAYER || is_replay_) { res = playsingle_scenario(end_level); if(is_replay_) { return res; From 847ee990a31b88673c39df1f1ec1f0101dfd11a2 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 01:02:22 +1100 Subject: [PATCH 16/57] Fixup e8c3fdb2381c This makes the dialog look good at 800x480 again --- data/gui/default/window/campaign_dialog.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/data/gui/default/window/campaign_dialog.cfg b/data/gui/default/window/campaign_dialog.cfg index cf44f7c198f7..36991797873d 100644 --- a/data/gui/default/window/campaign_dialog.cfg +++ b/data/gui/default/window/campaign_dialog.cfg @@ -418,7 +418,6 @@ vertical_alignment = "top" [scrollbar_panel] - horizontal_scrollbar_mode = "never" [definition] From 2b6566682386cb4e30d474765e8b5d3f8b26cab3 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 08:43:12 +1100 Subject: [PATCH 17/57] tpreferences: ensure all descriptions are shown --- src/gui/dialogs/preferences_dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/dialogs/preferences_dialog.cpp b/src/gui/dialogs/preferences_dialog.cpp index 307e6bcd04d5..bc7910d96cc2 100644 --- a/src/gui/dialogs/preferences_dialog.cpp +++ b/src/gui/dialogs/preferences_dialog.cpp @@ -851,7 +851,9 @@ void tpreferences::on_advanced_prefs_list_select(tlistbox& list, twindow& window // Add more options here as needed } - if(selected_type != ADVANCED_PREF_TYPE::TOGGLE && selected_type != ADVANCED_PREF_TYPE::SPECIAL) { + const bool has_description = !adv_preferences_cfg_[selected_row]["description"].empty(); + + if(has_description && selected_type != ADVANCED_PREF_TYPE::SPECIAL) { find_widget(get_advanced_row_grid(list, selected_row), "prefs_setter_grid", false) .set_visible(tcontrol::tvisible::visible); } From 74973218b1502c78efc2cedfa256a5e0fdba25dc Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Mon, 22 Feb 2016 19:06:59 -0300 Subject: [PATCH 18/57] Revert "gui2: dropped repeating buttons from scrollbars" This reverts commit 04d510a91cb9d9ff97a56b09690ca9499c82ab30. --- .../default/macros/horizontal_scrollbar.cfg | 41 +++++++++++++ .../gui/default/macros/vertical_scrollbar.cfg | 57 +++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/data/gui/default/macros/horizontal_scrollbar.cfg b/data/gui/default/macros/horizontal_scrollbar.cfg index 3762fff6f4c1..4f0d2d70ae77 100644 --- a/data/gui/default/macros/horizontal_scrollbar.cfg +++ b/data/gui/default/macros/horizontal_scrollbar.cfg @@ -8,6 +8,16 @@ horizontal_grow = "true" [row] + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_up" + definition = "left_arrow" + [/repeating_button] + + [/column] + [column] grow_factor = 1 horizontal_grow = "true" @@ -19,6 +29,16 @@ horizontal_grow = "true" [/column] + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_down" + definition = "right_arrow" + [/repeating_button] + + [/column] + [/row] [/grid] @@ -31,6 +51,16 @@ horizontal_grow = "true" [row] + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_up" + definition = "left_arrow_transparent" + [/repeating_button] + + [/column] + [column] grow_factor = 1 horizontal_grow = "true" @@ -42,7 +72,18 @@ horizontal_grow = "true" [/column] + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_down" + definition = "right_arrow_transparent" + [/repeating_button] + + [/column] + [/row] [/grid] #enddef + diff --git a/data/gui/default/macros/vertical_scrollbar.cfg b/data/gui/default/macros/vertical_scrollbar.cfg index cb4ea4e19654..704c8234f08b 100644 --- a/data/gui/default/macros/vertical_scrollbar.cfg +++ b/data/gui/default/macros/vertical_scrollbar.cfg @@ -6,6 +6,20 @@ vertical_grow = "true" [grid] id = "_vertical_scrollbar_grid" + [row] + + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_up" + definition = "up_arrow" + [/repeating_button] + + [/column] + + [/row] + [row] grow_factor = 1 @@ -21,6 +35,20 @@ vertical_grow = "true" [/row] + [row] + + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_down" + definition = "down_arrow" + [/repeating_button] + + [/column] + + [/row] + [/grid] #enddef @@ -29,6 +57,20 @@ vertical_grow = "true" [grid] id = "_vertical_scrollbar_grid" + [row] + + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_up" + definition = "up_arrow_transparent" + [/repeating_button] + + [/column] + + [/row] + [row] grow_factor = 1 @@ -44,5 +86,20 @@ vertical_grow = "true" [/row] + [row] + + [column] + + # note we want a special button definition for this later. + [repeating_button] + id = "_half_page_down" + definition = "down_arrow_transparent" + [/repeating_button] + + [/column] + + [/row] + [/grid] #enddef + From 2d99960930106464b3cd12517fe7fcd57d10d4df Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 11:02:04 +1100 Subject: [PATCH 19/57] =?UTF-8?q?UtBS=20S2:=20fixed=20Go=E2=80=99hag=20not?= =?UTF-8?q?=20being=20included=20in=20undead=20group=20death=20event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scenarios/02_Across_the_Harsh_Sands.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg index d600aef7a2d7..d5b10e6eb8a2 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg @@ -1091,7 +1091,7 @@ {VARIABLE shooters {ON_DIFFICULTY 1 1 2} } {VARIABLE revenants {ON_DIFFICULTY 0 1 1} } - {PLACE_UNITS_RANDOMLY 1 4 "Revenant" "Go'hag" ( _ "Go’hag") ()} + {PLACE_UNITS_RANDOMLY 1 4 "Revenant" "ElyssaUndead" ( _ "Go’hag") ()} {PLACE_UNITS_RANDOMLY $skeletons 4 "Skeleton" "ElyssaUndead" ( _ "Undead Raider") ()} {PLACE_UNITS_RANDOMLY $archers 4 "Skeleton Archer" "ElyssaUndead" ( _ "Undead Raider") ()} {PLACE_UNITS_RANDOMLY $revenants 4 "Revenant" "ElyssaUndead" ( _ "Undead Raider") ()} @@ -1113,14 +1113,14 @@ #ifdef HARD [message] - role="Go'hag" + name="Go’hag" message= _ "You have defied our master for the last time. Now you shall die! And I shall personally make it slow and painful, to thank you for that scorching you gave me." [/message] #else [message] - role="Go'hag" + name="Go’hag" message= _ "You have defied our master for the last time. Now you shall die!" [/message] From 7f02961ddaf467a29882a4acd32aa55201188ad5 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 11:04:38 +1100 Subject: [PATCH 20/57] Fixup 2d9996093010 --- .../scenarios/02_Across_the_Harsh_Sands.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg index d5b10e6eb8a2..3b670542bd56 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg @@ -1113,14 +1113,14 @@ #ifdef HARD [message] - name="Go’hag" + name= _ "Go’hag" message= _ "You have defied our master for the last time. Now you shall die! And I shall personally make it slow and painful, to thank you for that scorching you gave me." [/message] #else [message] - name="Go’hag" + name= _ "Go’hag" message= _ "You have defied our master for the last time. Now you shall die!" [/message] From a5d03e9519954bf09ca17f52fe51438146bafdb7 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Tue, 23 Feb 2016 01:54:20 +0100 Subject: [PATCH 21/57] remove support for name= in standart unit filters This causes OOS because the name differs in different languages Also this wasn't documented in the wiki --- src/unit_filter.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/unit_filter.cpp b/src/unit_filter.cpp index 541afb369f30..8498fb0af7c3 100644 --- a/src/unit_filter.cpp +++ b/src/unit_filter.cpp @@ -231,10 +231,6 @@ bool basic_unit_filter_impl::matches(const unit & u, const map_location& loc, co bool basic_unit_filter_impl::internal_matches_filter(const unit & u, const map_location& loc) const { - if (!vcfg["name"].blank() && vcfg["name"].str() != u.name()) { - return false; - } - if (!vcfg["id"].empty()) { std::vector id_list = utils::split(vcfg["id"]); if (std::find(id_list.begin(), id_list.end(), u.id()) == id_list.end()) { From 89e8341b1aa1ff72a05c014c1136b481df9479cd Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Tue, 23 Feb 2016 01:58:25 +0100 Subject: [PATCH 22/57] fix use of invalid name= attribute in standard unit filtes in UtbS scenario2 --- .../scenarios/02_Across_the_Harsh_Sands.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg index 3b670542bd56..4b62009fd0d4 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg @@ -1091,7 +1091,7 @@ {VARIABLE shooters {ON_DIFFICULTY 1 1 2} } {VARIABLE revenants {ON_DIFFICULTY 0 1 1} } - {PLACE_UNITS_RANDOMLY 1 4 "Revenant" "ElyssaUndead" ( _ "Go’hag") ()} + {PLACE_UNITS_RANDOMLY 1 4 "Revenant" "ElyssaUndead" ( _ "Go’hag") ( id="Go_hag" )} {PLACE_UNITS_RANDOMLY $skeletons 4 "Skeleton" "ElyssaUndead" ( _ "Undead Raider") ()} {PLACE_UNITS_RANDOMLY $archers 4 "Skeleton Archer" "ElyssaUndead" ( _ "Undead Raider") ()} {PLACE_UNITS_RANDOMLY $revenants 4 "Revenant" "ElyssaUndead" ( _ "Undead Raider") ()} @@ -1113,14 +1113,14 @@ #ifdef HARD [message] - name= _ "Go’hag" + id="Go_hag" message= _ "You have defied our master for the last time. Now you shall die! And I shall personally make it slow and painful, to thank you for that scorching you gave me." [/message] #else [message] - name= _ "Go’hag" + id="Go_hag" message= _ "You have defied our master for the last time. Now you shall die!" [/message] From 43e3f8e6316462fe1f3d837ad63d073ac0ca62a9 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 22 Feb 2016 21:57:40 -0500 Subject: [PATCH 23/57] XCode: Split up copy files phase a little May or may not speed up the build. Definitely improves the progress indicator a little bit. --- .../Xcode/Wesnoth.xcodeproj/project.pbxproj | 142 +++++++++++++++++- 1 file changed, 136 insertions(+), 6 deletions(-) diff --git a/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj b/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj index 4eab07f053ac..4a43b0b1e7f3 100644 --- a/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj +++ b/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj @@ -77,6 +77,35 @@ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 911F2DAD1BA086A400E3102E /* window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 911F2DAB1BA086A400E3102E /* window.cpp */; }; 911F2DB01BA086FA00E3102E /* alpha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 911F2DAE1BA086F900E3102E /* alpha.cpp */; }; + 91273E8F1C7BF1D7005E7F81 /* _main.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E721C7BF1C0005E7F81 /* _main.cfg */; }; + 91273E901C7BF1D7005E7F81 /* advanced_preferences.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E731C7BF1C0005E7F81 /* advanced_preferences.cfg */; }; + 91273E911C7BF1D7005E7F81 /* ai in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E741C7BF1C0005E7F81 /* ai */; }; + 91273E921C7BF1D7005E7F81 /* campaigns in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E751C7BF1C0005E7F81 /* campaigns */; }; + 91273E931C7BF1D8005E7F81 /* COPYING.txt in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E761C7BF1C0005E7F81 /* COPYING.txt */; }; + 91273E941C7BF1D8005E7F81 /* core in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E771C7BF1C0005E7F81 /* core */; }; + 91273E951C7BF1D8005E7F81 /* cores.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E781C7BF1C0005E7F81 /* cores.cfg */; }; + 91273E961C7BF1D8005E7F81 /* english.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E791C7BF1C1005E7F81 /* english.cfg */; }; + 91273E971C7BF1D8005E7F81 /* era_blank.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7A1C7BF1C1005E7F81 /* era_blank.cfg */; }; + 91273E981C7BF1D8005E7F81 /* game_config.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7B1C7BF1C1005E7F81 /* game_config.cfg */; }; + 91273E991C7BF1D8005E7F81 /* gui in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7C1C7BF1C1005E7F81 /* gui */; }; + 91273E9A1C7BF1D8005E7F81 /* hardwired in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7D1C7BF1C1005E7F81 /* hardwired */; }; + 91273E9B1C7BF1D8005E7F81 /* lan_server.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7E1C7BF1C2005E7F81 /* lan_server.cfg */; }; + 91273E9C1C7BF1D8005E7F81 /* languages in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E7F1C7BF1C2005E7F81 /* languages */; }; + 91273E9D1C7BF1D8005E7F81 /* lua in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E801C7BF1C2005E7F81 /* lua */; }; + 91273E9E1C7BF1D8005E7F81 /* multiplayer in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E811C7BF1C2005E7F81 /* multiplayer */; }; + 91273E9F1C7BF1D8005E7F81 /* scenario-formula-recruitment.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E821C7BF1C2005E7F81 /* scenario-formula-recruitment.cfg */; }; + 91273EA01C7BF1D8005E7F81 /* scenario-formula.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E831C7BF1C3005E7F81 /* scenario-formula.cfg */; }; + 91273EA11C7BF1D8005E7F81 /* scenario-leaders.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E841C7BF1C3005E7F81 /* scenario-leaders.cfg */; }; + 91273EA21C7BF1D8005E7F81 /* scenario-movethrough.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E851C7BF1C3005E7F81 /* scenario-movethrough.cfg */; }; + 91273EA31C7BF1D8005E7F81 /* scenario-poisoning.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E861C7BF1C3005E7F81 /* scenario-poisoning.cfg */; }; + 91273EA41C7BF1D8005E7F81 /* scenario-test.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E871C7BF1C3005E7F81 /* scenario-test.cfg */; }; + 91273EA51C7BF1D8005E7F81 /* schema-gui.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E881C7BF1C4005E7F81 /* schema-gui.cfg */; }; + 91273EA61C7BF1D8005E7F81 /* schema.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E891C7BF1C4005E7F81 /* schema.cfg */; }; + 91273EA71C7BF1D8005E7F81 /* shaders in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E8A1C7BF1C4005E7F81 /* shaders */; }; + 91273EA81C7BF1D8005E7F81 /* test in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E8B1C7BF1C4005E7F81 /* test */; }; + 91273EA91C7BF1D8005E7F81 /* themes in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E8C1C7BF1C4005E7F81 /* themes */; }; + 91273EAA1C7BF1D8005E7F81 /* tips.cfg in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E8D1C7BF1C5005E7F81 /* tips.cfg */; }; + 91273EAB1C7BF1D8005E7F81 /* tools in Copy Data Files */ = {isa = PBXBuildFile; fileRef = 91273E8E1C7BF1C5005E7F81 /* tools */; }; 9130A4601C73BB6100852782 /* select_orb_colors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9130A45E1C73BB6100852782 /* select_orb_colors.cpp */; }; 9130A4611C73BB6100852782 /* select_orb_colors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9130A45E1C73BB6100852782 /* select_orb_colors.cpp */; }; 919B37F81BAF789E00E0094C /* synced_user_choice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 919B37F71BAF789D00E0094C /* synced_user_choice.cpp */; }; @@ -678,7 +707,6 @@ B59F9733103716E400A57C1A /* unit_create.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B59F9731103716E400A57C1A /* unit_create.cpp */; }; B59F9734103716E400A57C1A /* unit_create.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B59F9731103716E400A57C1A /* unit_create.cpp */; }; B5A9B2290ECA4074002BE442 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = B5A9914A0ECA4064002BE442 /* fonts */; }; - B5A9B22A0ECA4074002BE442 /* data in Resources */ = {isa = PBXBuildFile; fileRef = B5A991500ECA4064002BE442 /* data */; }; B5A9B22B0ECA4074002BE442 /* images in Resources */ = {isa = PBXBuildFile; fileRef = B5A9B0780ECA4074002BE442 /* images */; }; B5A9B22C0ECA4074002BE442 /* sounds in Resources */ = {isa = PBXBuildFile; fileRef = B5A9B2140ECA4074002BE442 /* sounds */; }; B5A9BD320ECA805A002BE442 /* addon_connect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B5A9BCB00ECA805A002BE442 /* addon_connect.cpp */; }; @@ -998,7 +1026,6 @@ ECD39895194B844A00CF2125 /* display_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECD39894194B844A00CF2125 /* display_context.cpp */; }; ECD5D7BF1A22DC8600114175 /* lua_cpp_function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECD5D7BE1A22DC8600114175 /* lua_cpp_function.cpp */; }; ECDEAF72194FE84000DB2F47 /* fake_unit_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECDEAF6D194FE84000DB2F47 /* fake_unit_manager.cpp */; }; - ECDEAF75194FE86C00DB2F47 /* animated.tpp in Resources */ = {isa = PBXBuildFile; fileRef = ECDEAF74194FE86C00DB2F47 /* animated.tpp */; }; ECDEAF77194FEA8500DB2F47 /* syncmp_handler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECDEAF76194FEA8400DB2F47 /* syncmp_handler.cpp */; }; ECDEAF79194FEA9D00DB2F47 /* game_classification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECDEAF78194FEA9D00DB2F47 /* game_classification.cpp */; }; ECDF18201A3FE0DE00D157A6 /* manager_impl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ECDF181E1A3FE0DE00D157A6 /* manager_impl.cpp */; }; @@ -1068,6 +1095,45 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 91273E191C7BF105005E7F81 /* Copy Data Files */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = data; + dstSubfolderSpec = 7; + files = ( + 91273E8F1C7BF1D7005E7F81 /* _main.cfg in Copy Data Files */, + 91273E901C7BF1D7005E7F81 /* advanced_preferences.cfg in Copy Data Files */, + 91273E911C7BF1D7005E7F81 /* ai in Copy Data Files */, + 91273E921C7BF1D7005E7F81 /* campaigns in Copy Data Files */, + 91273E931C7BF1D8005E7F81 /* COPYING.txt in Copy Data Files */, + 91273E941C7BF1D8005E7F81 /* core in Copy Data Files */, + 91273E951C7BF1D8005E7F81 /* cores.cfg in Copy Data Files */, + 91273E961C7BF1D8005E7F81 /* english.cfg in Copy Data Files */, + 91273E971C7BF1D8005E7F81 /* era_blank.cfg in Copy Data Files */, + 91273E981C7BF1D8005E7F81 /* game_config.cfg in Copy Data Files */, + 91273E991C7BF1D8005E7F81 /* gui in Copy Data Files */, + 91273E9A1C7BF1D8005E7F81 /* hardwired in Copy Data Files */, + 91273E9B1C7BF1D8005E7F81 /* lan_server.cfg in Copy Data Files */, + 91273E9C1C7BF1D8005E7F81 /* languages in Copy Data Files */, + 91273E9D1C7BF1D8005E7F81 /* lua in Copy Data Files */, + 91273E9E1C7BF1D8005E7F81 /* multiplayer in Copy Data Files */, + 91273E9F1C7BF1D8005E7F81 /* scenario-formula-recruitment.cfg in Copy Data Files */, + 91273EA01C7BF1D8005E7F81 /* scenario-formula.cfg in Copy Data Files */, + 91273EA11C7BF1D8005E7F81 /* scenario-leaders.cfg in Copy Data Files */, + 91273EA21C7BF1D8005E7F81 /* scenario-movethrough.cfg in Copy Data Files */, + 91273EA31C7BF1D8005E7F81 /* scenario-poisoning.cfg in Copy Data Files */, + 91273EA41C7BF1D8005E7F81 /* scenario-test.cfg in Copy Data Files */, + 91273EA51C7BF1D8005E7F81 /* schema-gui.cfg in Copy Data Files */, + 91273EA61C7BF1D8005E7F81 /* schema.cfg in Copy Data Files */, + 91273EA71C7BF1D8005E7F81 /* shaders in Copy Data Files */, + 91273EA81C7BF1D8005E7F81 /* test in Copy Data Files */, + 91273EA91C7BF1D8005E7F81 /* themes in Copy Data Files */, + 91273EAA1C7BF1D8005E7F81 /* tips.cfg in Copy Data Files */, + 91273EAB1C7BF1D8005E7F81 /* tools in Copy Data Files */, + ); + name = "Copy Data Files"; + runOnlyForDeploymentPostprocessing = 0; + }; B5599E8F0EC64D18008DD061 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1266,6 +1332,35 @@ 911F2DAE1BA086F900E3102E /* alpha.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = alpha.cpp; sourceTree = ""; }; 911F2DAF1BA086FA00E3102E /* alpha.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = alpha.hpp; sourceTree = ""; }; 911F2DB11BA0870E00E3102E /* compat.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = compat.hpp; sourceTree = ""; }; + 91273E721C7BF1C0005E7F81 /* _main.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = _main.cfg; sourceTree = ""; }; + 91273E731C7BF1C0005E7F81 /* advanced_preferences.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = advanced_preferences.cfg; sourceTree = ""; }; + 91273E741C7BF1C0005E7F81 /* ai */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ai; sourceTree = ""; }; + 91273E751C7BF1C0005E7F81 /* campaigns */ = {isa = PBXFileReference; lastKnownFileType = folder; path = campaigns; sourceTree = ""; }; + 91273E761C7BF1C0005E7F81 /* COPYING.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = COPYING.txt; sourceTree = ""; }; + 91273E771C7BF1C0005E7F81 /* core */ = {isa = PBXFileReference; lastKnownFileType = folder; path = core; sourceTree = ""; }; + 91273E781C7BF1C0005E7F81 /* cores.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = cores.cfg; sourceTree = ""; }; + 91273E791C7BF1C1005E7F81 /* english.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = english.cfg; sourceTree = ""; }; + 91273E7A1C7BF1C1005E7F81 /* era_blank.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = era_blank.cfg; sourceTree = ""; }; + 91273E7B1C7BF1C1005E7F81 /* game_config.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = game_config.cfg; sourceTree = ""; }; + 91273E7C1C7BF1C1005E7F81 /* gui */ = {isa = PBXFileReference; lastKnownFileType = folder; path = gui; sourceTree = ""; }; + 91273E7D1C7BF1C1005E7F81 /* hardwired */ = {isa = PBXFileReference; lastKnownFileType = folder; path = hardwired; sourceTree = ""; }; + 91273E7E1C7BF1C2005E7F81 /* lan_server.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = lan_server.cfg; sourceTree = ""; }; + 91273E7F1C7BF1C2005E7F81 /* languages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = languages; sourceTree = ""; }; + 91273E801C7BF1C2005E7F81 /* lua */ = {isa = PBXFileReference; lastKnownFileType = folder; path = lua; sourceTree = ""; }; + 91273E811C7BF1C2005E7F81 /* multiplayer */ = {isa = PBXFileReference; lastKnownFileType = folder; path = multiplayer; sourceTree = ""; }; + 91273E821C7BF1C2005E7F81 /* scenario-formula-recruitment.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-formula-recruitment.cfg"; sourceTree = ""; }; + 91273E831C7BF1C3005E7F81 /* scenario-formula.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-formula.cfg"; sourceTree = ""; }; + 91273E841C7BF1C3005E7F81 /* scenario-leaders.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-leaders.cfg"; sourceTree = ""; }; + 91273E851C7BF1C3005E7F81 /* scenario-movethrough.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-movethrough.cfg"; sourceTree = ""; }; + 91273E861C7BF1C3005E7F81 /* scenario-poisoning.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-poisoning.cfg"; sourceTree = ""; }; + 91273E871C7BF1C3005E7F81 /* scenario-test.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "scenario-test.cfg"; sourceTree = ""; }; + 91273E881C7BF1C4005E7F81 /* schema-gui.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = "schema-gui.cfg"; sourceTree = ""; }; + 91273E891C7BF1C4005E7F81 /* schema.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = schema.cfg; sourceTree = ""; }; + 91273E8A1C7BF1C4005E7F81 /* shaders */ = {isa = PBXFileReference; lastKnownFileType = folder; path = shaders; sourceTree = ""; }; + 91273E8B1C7BF1C4005E7F81 /* test */ = {isa = PBXFileReference; lastKnownFileType = folder; path = test; sourceTree = ""; }; + 91273E8C1C7BF1C4005E7F81 /* themes */ = {isa = PBXFileReference; lastKnownFileType = folder; path = themes; sourceTree = ""; }; + 91273E8D1C7BF1C5005E7F81 /* tips.cfg */ = {isa = PBXFileReference; lastKnownFileType = text; path = tips.cfg; sourceTree = ""; }; + 91273E8E1C7BF1C5005E7F81 /* tools */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tools; sourceTree = ""; }; 9130A45E1C73BB6100852782 /* select_orb_colors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = select_orb_colors.cpp; sourceTree = ""; }; 9130A45F1C73BB6100852782 /* select_orb_colors.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = select_orb_colors.hpp; sourceTree = ""; }; 919B37F71BAF789D00E0094C /* synced_user_choice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = synced_user_choice.cpp; sourceTree = ""; }; @@ -1965,7 +2060,6 @@ B5A5E3E412132C790047782D /* lzio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lzio.h; sourceTree = ""; }; B5A5E45012132DE30047782D /* lua_api.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_api.hpp; sourceTree = ""; }; B5A9914A0ECA4064002BE442 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../../fonts; sourceTree = SOURCE_ROOT; }; - B5A991500ECA4064002BE442 /* data */ = {isa = PBXFileReference; lastKnownFileType = folder; name = data; path = ../../data; sourceTree = SOURCE_ROOT; }; B5A9B0780ECA4074002BE442 /* images */ = {isa = PBXFileReference; lastKnownFileType = folder; name = images; path = ../../images; sourceTree = SOURCE_ROOT; }; B5A9B2140ECA4074002BE442 /* sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sounds; path = ../../sounds; sourceTree = SOURCE_ROOT; }; B5A9BCB00ECA805A002BE442 /* addon_connect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = addon_connect.cpp; sourceTree = ""; }; @@ -2986,7 +3080,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( - B5A991500ECA4064002BE442 /* data */, + 91273E541C7BF141005E7F81 /* data */, B5A9914A0ECA4064002BE442 /* fonts */, EC1D88DE18EF448400E66AC1 /* fonts.conf */, B508D14A10013E4700B12852 /* Growl Registration Ticket.growlRegDict */, @@ -3236,6 +3330,43 @@ path = toolkit; sourceTree = ""; }; + 91273E541C7BF141005E7F81 /* data */ = { + isa = PBXGroup; + children = ( + 91273E721C7BF1C0005E7F81 /* _main.cfg */, + 91273E731C7BF1C0005E7F81 /* advanced_preferences.cfg */, + 91273E741C7BF1C0005E7F81 /* ai */, + 91273E751C7BF1C0005E7F81 /* campaigns */, + 91273E761C7BF1C0005E7F81 /* COPYING.txt */, + 91273E771C7BF1C0005E7F81 /* core */, + 91273E781C7BF1C0005E7F81 /* cores.cfg */, + 91273E791C7BF1C1005E7F81 /* english.cfg */, + 91273E7A1C7BF1C1005E7F81 /* era_blank.cfg */, + 91273E7B1C7BF1C1005E7F81 /* game_config.cfg */, + 91273E7C1C7BF1C1005E7F81 /* gui */, + 91273E7D1C7BF1C1005E7F81 /* hardwired */, + 91273E7E1C7BF1C2005E7F81 /* lan_server.cfg */, + 91273E7F1C7BF1C2005E7F81 /* languages */, + 91273E801C7BF1C2005E7F81 /* lua */, + 91273E811C7BF1C2005E7F81 /* multiplayer */, + 91273E821C7BF1C2005E7F81 /* scenario-formula-recruitment.cfg */, + 91273E831C7BF1C3005E7F81 /* scenario-formula.cfg */, + 91273E841C7BF1C3005E7F81 /* scenario-leaders.cfg */, + 91273E851C7BF1C3005E7F81 /* scenario-movethrough.cfg */, + 91273E861C7BF1C3005E7F81 /* scenario-poisoning.cfg */, + 91273E871C7BF1C3005E7F81 /* scenario-test.cfg */, + 91273E881C7BF1C4005E7F81 /* schema-gui.cfg */, + 91273E891C7BF1C4005E7F81 /* schema.cfg */, + 91273E8A1C7BF1C4005E7F81 /* shaders */, + 91273E8B1C7BF1C4005E7F81 /* test */, + 91273E8C1C7BF1C4005E7F81 /* themes */, + 91273E8D1C7BF1C5005E7F81 /* tips.cfg */, + 91273E8E1C7BF1C5005E7F81 /* tools */, + ); + name = data; + path = ../../data; + sourceTree = ""; + }; 91B6218E1B76710700B00E0F /* help */ = { isa = PBXGroup; children = ( @@ -4359,6 +4490,7 @@ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Wesnoth" */; buildPhases = ( 8D1107290486CEB800E47090 /* Resources */, + 91273E191C7BF105005E7F81 /* Copy Data Files */, 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, B5599E8F0EC64D18008DD061 /* CopyFiles */, @@ -4442,8 +4574,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - ECDEAF75194FE86C00DB2F47 /* animated.tpp in Resources */, - B5A9B22A0ECA4074002BE442 /* data in Resources */, B5A9B2290ECA4074002BE442 /* fonts in Resources */, EC1D88DF18EF448400E66AC1 /* fonts.conf in Resources */, B508D14B10013E4700B12852 /* Growl Registration Ticket.growlRegDict in Resources */, From 1a6bfca90356f90a182ae4267f16ad11eaa9d4c7 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 19:40:58 +1100 Subject: [PATCH 24/57] tpreferences: cleaned up some unnecessary grid nesting --- .../default/window/preferences/01_general.cfg | 35 ++++++++----------- .../default/window/preferences/02_display.cfg | 35 ++++++++----------- .../default/window/preferences/03_sound.cfg | 17 +++------ .../window/preferences/05_advanced.cfg | 17 +++------ 4 files changed, 38 insertions(+), 66 deletions(-) diff --git a/data/gui/default/window/preferences/01_general.cfg b/data/gui/default/window/preferences/01_general.cfg index a81826b128fc..3174c603f7ca 100644 --- a/data/gui/default/window/preferences/01_general.cfg +++ b/data/gui/default/window/preferences/01_general.cfg @@ -235,35 +235,28 @@ #enddef [layer] + [row] [column] - horizontal_grow = true - vertical_grow = true - + horizontal_grow = "true" + vertical_alignment = "top" [grid] - [row] - [column] - horizontal_grow = "true" - vertical_alignment = "top" - [grid] - {_GUI_PREFERENCES_GENERAL_GRID_1} - [/grid] - [/column] - [/row] + {_GUI_PREFERENCES_GENERAL_GRID_1} + [/grid] + [/column] + [/row] - [row] - [column] - horizontal_alignment = "left" - vertical_alignment = "bottom" + [row] + [column] + horizontal_alignment = "left" + vertical_alignment = "bottom" - [grid] - {_GUI_PREFERENCES_GENERAL_GRID_2} - [/grid] - [/column] - [/row] + [grid] + {_GUI_PREFERENCES_GENERAL_GRID_2} [/grid] [/column] [/row] + [/layer] #undef _GUI_PREFERENCES_GENERAL_GRID_1 diff --git a/data/gui/default/window/preferences/02_display.cfg b/data/gui/default/window/preferences/02_display.cfg index f7cf9d56867a..5499464e36b2 100644 --- a/data/gui/default/window/preferences/02_display.cfg +++ b/data/gui/default/window/preferences/02_display.cfg @@ -279,36 +279,29 @@ #enddef [layer] + [row] [column] - horizontal_grow = true - vertical_grow = true + horizontal_grow = "true" + vertical_alignment = "top" [grid] - [row] - [column] - horizontal_grow = "true" - vertical_alignment = "top" - - [grid] - {_GUI_PREFERENCES_DISPLAY_GRID_1} - [/grid] - [/column] - [/row] + {_GUI_PREFERENCES_DISPLAY_GRID_1} + [/grid] + [/column] + [/row] - [row] - [column] - horizontal_alignment = "left" - vertical_alignment = "bottom" + [row] + [column] + horizontal_alignment = "left" + vertical_alignment = "bottom" - [grid] - {_GUI_PREFERENCES_DISPLAY_GRID_2} - [/grid] - [/column] - [/row] + [grid] + {_GUI_PREFERENCES_DISPLAY_GRID_2} [/grid] [/column] [/row] + [/layer] #undef _GUI_PREFERENCES_DISPLAY_GRID_1 diff --git a/data/gui/default/window/preferences/03_sound.cfg b/data/gui/default/window/preferences/03_sound.cfg index e46a715ad976..a36485250680 100644 --- a/data/gui/default/window/preferences/03_sound.cfg +++ b/data/gui/default/window/preferences/03_sound.cfg @@ -106,25 +106,18 @@ #enddef [layer] + [row] [column] - horizontal_grow = true - vertical_grow = true + horizontal_grow = "true" + vertical_alignment = "top" [grid] - [row] - [column] - horizontal_grow = "true" - vertical_alignment = "top" - - [grid] - {_GUI_PREFERENCES_SOUND_GRID} - [/grid] - [/column] - [/row] + {_GUI_PREFERENCES_SOUND_GRID} [/grid] [/column] [/row] + [/layer] #undef _GUI_PREFERENCES_SOUND_GRID diff --git a/data/gui/default/window/preferences/05_advanced.cfg b/data/gui/default/window/preferences/05_advanced.cfg index 940961d87fc5..e9e911f35dc9 100644 --- a/data/gui/default/window/preferences/05_advanced.cfg +++ b/data/gui/default/window/preferences/05_advanced.cfg @@ -134,25 +134,18 @@ #enddef [layer] + [row] [column] - horizontal_grow = true - vertical_grow = true + horizontal_grow = "true" + vertical_alignment = "top" [grid] - [row] - [column] - horizontal_grow = "true" - vertical_alignment = "top" - - [grid] - {_GUI_ADVANCED_GRID} - [/grid] - [/column] - [/row] + {_GUI_ADVANCED_GRID} [/grid] [/column] [/row] + [/layer] #undef _GUI_ADVANCED_GRID From 05411b6d34ad19440565feea8a4bf6d5271bb0a9 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 19:42:39 +1100 Subject: [PATCH 25/57] tpreferences: made sure Scroll Speed slider fills all available space --- data/gui/default/window/preferences/01_general.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/gui/default/window/preferences/01_general.cfg b/data/gui/default/window/preferences/01_general.cfg index 3174c603f7ca..f0f37b8ca656 100644 --- a/data/gui/default/window/preferences/01_general.cfg +++ b/data/gui/default/window/preferences/01_general.cfg @@ -11,6 +11,7 @@ [grid] [row] [column] + grow_factor = 0 border = "all" border_size = 5 horizontal_alignment = "left" @@ -21,6 +22,7 @@ [/column] [column] + grow_factor = 1 border = "all" border_size = 5 horizontal_grow = true From f23bc20e8217d558cd11f450d9a1633555a6bd11 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 21:36:50 +1100 Subject: [PATCH 26/57] tpreferences: fixed incorrect use of doxygen comments --- src/gui/dialogs/preferences_dialog.cpp | 81 +++++++++++++------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/src/gui/dialogs/preferences_dialog.cpp b/src/gui/dialogs/preferences_dialog.cpp index bc7910d96cc2..381a60dfd9b5 100644 --- a/src/gui/dialogs/preferences_dialog.cpp +++ b/src/gui/dialogs/preferences_dialog.cpp @@ -412,11 +412,11 @@ void tpreferences::initialize_members(twindow& window) // GENERAL PANEL // - /** SCROLL SPEED **/ + /* SCROLL SPEED */ setup_single_slider("scroll_speed", scroll_speed(), set_scroll_speed, window); - /** ACCELERATED SPEED **/ + /* ACCELERATED SPEED */ ttoggle_button& accl_toggle = find_widget(&window, "turbo_toggle", false); tslider& accl_slider = @@ -446,39 +446,39 @@ void tpreferences::initialize_members(twindow& window) bind_status_label(accl_slider, "turbo_value", window); - /** SKIP AI MOVES **/ + /* SKIP AI MOVES */ setup_single_toggle("skip_ai_moves", !show_ai_moves(), set_show_ai_moves, window, true); - /** DISABLE AUTO MOVES **/ + /* DISABLE AUTO MOVES */ setup_single_toggle("disable_auto_moves", disable_auto_moves(), set_disable_auto_moves, window); - /** TURN DIALOG **/ + /* TURN DIALOG */ setup_single_toggle("show_turn_dialog", turn_dialog(), set_turn_dialog, window); - /** ENABLE PLANNING MODE **/ + /* ENABLE PLANNING MODE */ setup_single_toggle("whiteboard_on_start", enable_whiteboard_mode_on_start(), set_enable_whiteboard_mode_on_start, window); - /** HIDE ALLY PLANS **/ + /* HIDE ALLY PLANS */ setup_single_toggle("whiteboard_hide_allies", hide_whiteboard(), set_hide_whiteboard, window); - /** INTERRUPT ON SIGHTING **/ + /* INTERRUPT ON SIGHTING */ setup_single_toggle("interrupt_move_when_ally_sighted", interrupt_when_ally_sighted(), set_interrupt_when_ally_sighted, window); - /** SAVE REPLAYS **/ + /* SAVE REPLAYS */ setup_single_toggle("save_replays", save_replays(), set_save_replays, window); - /** DELETE AUTOSAVES **/ + /* DELETE AUTOSAVES */ setup_single_toggle("delete_saves", delete_saves(), set_delete_saves, window); - /** MAX AUTO SAVES **/ + /* MAX AUTO SAVES */ tslider& autosaves_slider = find_widget(&window, "max_saves_slider", false); tcontrol& autosaves_label = find_widget(&window, "max_saves_value", false); @@ -491,12 +491,12 @@ void tpreferences::initialize_members(twindow& window) &tpreferences::max_autosaves_slider_callback, this, boost::ref(autosaves_slider), boost::ref(autosaves_label))); - /** SET HOTKEYS **/ + /* SET HOTKEYS */ connect_signal_mouse_left_click(find_widget(&window, "hotkeys", false), boost::bind(&show_hotkeys_preferences_dialog, boost::ref(window.video()))); - /** CACHE MANAGE **/ + /* CACHE MANAGE */ connect_signal_mouse_left_click(find_widget(&window, "cachemg", false), boost::bind(&gui2::tgame_cache_options::display, boost::ref(window.video()))); @@ -505,7 +505,7 @@ void tpreferences::initialize_members(twindow& window) // DISPLAY PANEL // - /** FULLSCREEN TOGGLE **/ + /* FULLSCREEN TOGGLE */ ttoggle_button& toggle_fullscreen = find_widget(&window, "fullscreen", false); @@ -516,7 +516,7 @@ void tpreferences::initialize_members(twindow& window) &tpreferences::fullscreen_toggle_callback, this, boost::ref(window))); - /** SET RESOLUTION **/ + /* SET RESOLUTION */ tcombobox& res_list = find_widget(&window, "resolution_set", false); res_list.set_use_markup(true); @@ -527,36 +527,36 @@ void tpreferences::initialize_members(twindow& window) boost::bind(&tpreferences::handle_res_select, this, boost::ref(window))); - /** SHOW FLOATING LABELS **/ + /* SHOW FLOATING LABELS */ setup_single_toggle("show_floating_labels", show_floating_labels(), set_show_floating_labels, window); - /** SHOW HALOES **/ + /* SHOW HALOES */ setup_single_toggle("show_halos", show_haloes(), set_show_haloes, window); - /** SHOW TEAM COLORS **/ + /* SHOW TEAM COLORS */ setup_single_toggle("show_ellipses", show_side_colors(), set_show_side_colors, window); - /** SHOW GRID **/ + /* SHOW GRID */ setup_single_toggle("show_grid", grid(), set_grid, window); - /** ANIMATE MAP **/ + /* ANIMATE MAP */ setup_single_toggle("animate_terrains", animate_map(), set_animate_map, window); - /** SHOW UNIT STANDING ANIMS **/ + /* SHOW UNIT STANDING ANIMS */ setup_single_toggle("animate_units_standing", show_standing_animations(), set_show_standing_animations, window); - /** SHOW UNIT IDLE ANIMS **/ + /* SHOW UNIT IDLE ANIMS */ setup_toggle_slider_pair("animate_units_idle", "idle_anim_frequency", idle_anim(), idle_anim_rate(), set_idle_anim, set_idle_anim_rate, window); - /** FONT SCALING **/ + /* FONT SCALING */ tslider& scale_slider = find_widget(&window, "scaling_slider", false); scale_slider.set_value(font_scaling()); @@ -567,7 +567,7 @@ void tpreferences::initialize_members(twindow& window) bind_status_label(scale_slider, "scaling_value", window, "%"); - /** SELECT THEME **/ + /* SELECT THEME */ connect_signal_mouse_left_click( find_widget(&window, "choose_theme", false), boost::bind(&show_theme_dialog, @@ -578,22 +578,22 @@ void tpreferences::initialize_members(twindow& window) // SOUND PANEL // - /** SOUND FX **/ + /* SOUND FX */ setup_toggle_slider_pair("sound_toggle_sfx", "sound_volume_sfx", sound_on(), sound_volume(), set_sound, set_sound_volume, window); - /** MUSIC **/ + /* MUSIC */ setup_toggle_slider_pair("sound_toggle_music", "sound_volume_music", music_on(), music_volume(), set_music, set_music_volume, window); - /** TURN BELL **/ + /* TURN BELL */ setup_toggle_slider_pair("sound_toggle_bell", "sound_volume_bell", turn_bell(), bell_volume(), set_turn_bell, set_bell_volume, window); - /** UI FX **/ + /* UI FX */ setup_toggle_slider_pair("sound_toggle_uisfx", "sound_volume_uisfx", UI_sound_on(), UI_volume(), set_UI_sound, set_UI_volume, window); @@ -603,31 +603,31 @@ void tpreferences::initialize_members(twindow& window) // MULTIPLAYER PANEL // - /** CHAT LINES **/ + /* CHAT LINES */ setup_single_slider("chat_lines", chat_lines(), set_chat_lines, window); - /** CHAT TIMESTAMPPING **/ + /* CHAT TIMESTAMPPING */ setup_single_toggle("chat_timestamps", chat_timestamping(), set_chat_timestamping, window); - /** SAVE PASSWORD **/ + /* SAVE PASSWORD */ setup_single_toggle("remember_password", remember_password(), set_remember_password, window); - /** SORT LOBBY LIST **/ + /* SORT LOBBY LIST */ setup_single_toggle("lobby_sort_players", sort_list(), _set_sort_list, window); - /** ICONIZE LOBBY LIST **/ + /* ICONIZE LOBBY LIST */ setup_single_toggle("lobby_player_icons", iconize_list(), _set_iconize_list, window); - /** WHISPERS FROM FRIENDS ONLY **/ + /* WHISPERS FROM FRIENDS ONLY */ setup_single_toggle("lobby_whisper_friends_only", whisper_friends_only(), set_whisper_friends_only, window); - /** LOBBY JOIN NOTIFICATIONS **/ + /* LOBBY JOIN NOTIFICATIONS */ setup_radio_toggle("lobby_joins_none", SHOW_NONE, lobby_joins(), lobby_joins_, window); setup_radio_toggle("lobby_joins_friends", SHOW_FRIENDS, @@ -635,7 +635,7 @@ void tpreferences::initialize_members(twindow& window) setup_radio_toggle("lobby_joins_all", SHOW_ALL, lobby_joins(), lobby_joins_, window); - /** FRIENDS LIST **/ + /* FRIENDS LIST */ setup_friends_list(window); ttext_box& textbox = find_widget(&window, "friend_name_box", false); @@ -671,13 +671,13 @@ void tpreferences::initialize_members(twindow& window) friend_list.select_row(0); - /** ALERTS **/ + /* ALERTS */ connect_signal_mouse_left_click( find_widget(&window, "mp_alerts", false), boost::bind(&gui2::tmp_alerts_options::display, boost::ref(window.video()))); - /** SET WESNOTHD PATH **/ + /* SET WESNOTHD PATH */ connect_signal_mouse_left_click( find_widget(&window, "mp_wesnothd", false), boost::bind( &show_wesnothd_server_search, @@ -883,7 +883,10 @@ void tpreferences::add_tab(tlistbox& tab_bar, const std::string& label) void tpreferences::initialize_tabs(twindow& window) { - /** MULTIPLAYER TABS **/ + // + // MULTIPLAYER TABS + // + tlistbox& tabs_multiplayer = find_widget(&window, "mp_tab", false); add_tab(tabs_multiplayer, _("Prefs tab^General")); add_tab(tabs_multiplayer, _("Prefs tab^Friends")); From 168fce195844c0b6b840373da240fdee90b1590e Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 23 Feb 2016 21:59:36 +1100 Subject: [PATCH 27/57] LoW S3: fixed incorrectly placed labels (bugs #22931, #23776) I'm not sure why, but it seems the labels need to be initialized in prestart if using [shift_labels] since I removed the explicit loading of that tag's lua in a preload event. I'm also not sure why the shift values needed to be updated, but everything seems to work now, which is what matters. --- .../scenarios/chapter1/03_Kalian_under_Attack.cfg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg index 356be20ff09e..631dc2a51e63 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg @@ -22,11 +22,12 @@ #### Map setup #### {LOW_MAP Kalian.map} - {campaigns/Legend_of_Wesmere/maps/Kalian_map.cfg} [event] name=prestart + {campaigns/Legend_of_Wesmere/maps/Kalian_map.cfg} + [replace_map] x=9-53 y=9-53 @@ -34,7 +35,7 @@ [/replace_map] [shift_labels] x=-8 - y=-2 + y=-9 [/shift_labels] [/event] From cca804e78d3b08e6c940bb30ef43ccb5ae41142f Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 00:28:56 +1100 Subject: [PATCH 28/57] Add 'is_local' to recognized key list --- src/team.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/team.cpp b/src/team.cpp index c9b1f5f61409..b2c6a18fd0ef 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -65,7 +65,7 @@ const boost::container::flat_set team::attributes = boost::assign:: ("recall_cost")("recruit")("save_id")("scroll_to_leader") ("share_vision")("share_maps")("share_view")("shroud")("shroud_data")("start_gold") ("suppress_end_turn_confirmation") - ("team_name")("user_team_name")("village_gold")("village_support") + ("team_name")("user_team_name")("village_gold")("village_support")("is_local") // Multiplayer attributes. ("action_bonus_count")("allow_changes")("allow_player")("color_lock") ("countdown_time")("disallow_observers")("faction") From 1c0085616a8a07da937d4bc636b5f496c64f8a44 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 01:06:20 +1100 Subject: [PATCH 29/57] Implement is_replay() in playsingle_controller --- src/hotkey_handler_sp.cpp | 2 +- src/playsingle_controller.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hotkey_handler_sp.cpp b/src/hotkey_handler_sp.cpp index b936d46b68ea..57f9efe62fdf 100644 --- a/src/hotkey_handler_sp.cpp +++ b/src/hotkey_handler_sp.cpp @@ -290,7 +290,7 @@ bool playsingle_controller::hotkey_handler::can_execute_command(const hotkey::ho case hotkey::HOTKEY_REPLAY_RESET: return playsingle_controller_.get_replay_controller() && playsingle_controller_.get_replay_controller()->can_execute_command(cmd, index); case hotkey::HOTKEY_REPLAY_EXIT: - return playsingle_controller_.get_replay_controller() != NULL; + return playsingle_controller_.is_replay(); default: return play_controller::hotkey_handler::can_execute_command(cmd, index); } return res; diff --git a/src/playsingle_controller.hpp b/src/playsingle_controller.hpp index f03da75541df..fff2b53470c5 100644 --- a/src/playsingle_controller.hpp +++ b/src/playsingle_controller.hpp @@ -59,8 +59,8 @@ class playsingle_controller : public play_controller bool get_player_type_changed() const { return player_type_changed_; } void set_player_type_changed() { player_type_changed_ = true; } virtual bool should_return_to_play_side(); - replay_controller * get_replay_controller() - { return mp_replay_.get(); } + replay_controller * get_replay_controller() { return mp_replay_.get(); } + bool is_replay() { return get_replay_controller() != NULL; } void enable_replay(bool is_unit_test = false); void on_replay_end(bool is_unit_test); protected: From 800a590525bea30305fe68afe152ffa1eb571ad4 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 01:10:13 +1100 Subject: [PATCH 30/57] Moved synced_context replay check deeper It's caught by more calls this way. --- src/synced_context.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/synced_context.cpp b/src/synced_context.cpp index 9b3eb474a9cf..eea90974cef8 100644 --- a/src/synced_context.cpp +++ b/src/synced_context.cpp @@ -91,6 +91,12 @@ bool synced_context::run(const std::string& commandname, const config& data, boo bool synced_context::run_and_store(const std::string& commandname, const config& data, bool use_undo, bool show, synced_command::error_handler_function error_handler) { + if(resources::controller->is_replay()) + { + ERR_REPLAY << "ignored attempt to invoke a synced command during replay\n"; + return false; + } + assert(resources::recorder->at_end()); resources::recorder->add_synced_command(commandname, data); bool success = run(commandname, data, use_undo, show, error_handler); @@ -117,11 +123,6 @@ bool synced_context::run_in_synced_context_if_not_already(const std::string& com { case(synced_context::UNSYNCED): { - if(resources::controller->is_replay()) - { - ERR_REPLAY << "ignored attempt to invoke a synced command during replay\n"; - return false; - } return run_and_throw(commandname, data, use_undo, show, error_handler); } case(synced_context::LOCAL_CHOICE): From 53190dfb4c550da77266f6d673e4af14eb5f6322 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 01:10:39 +1100 Subject: [PATCH 31/57] Fixed a typo in an error --- src/replay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replay.cpp b/src/replay.cpp index cad65269aae7..0b68bec38f6d 100644 --- a/src/replay.cpp +++ b/src/replay.cpp @@ -846,7 +846,7 @@ REPLAY_RETURN do_replay_handle(bool one_move) ERR_REPLAY << "recieved a synced [command] from side " << (*cfg)["from_side"].to_int(0) << ". Expacted was a [command] from side " << resources::controller->current_side() << "\n"; } else if((*cfg)["side_invalid"].to_bool(false)) { - ERR_REPLAY << "recieved a synced [command] from side " << (*cfg)["from_side"].to_int(0) << ". Sended from wrong client.\n"; + ERR_REPLAY << "recieved a synced [command] from side " << (*cfg)["from_side"].to_int(0) << ". Sent from wrong client.\n"; } /* we need to use the undo stack during replays in order to make delayed shroud updated work. From 3683490ac6885e58c7577a3080e747975dd1f9dc Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Tue, 23 Feb 2016 15:13:50 +0100 Subject: [PATCH 32/57] add wanring for name= in standard unit filters. --- src/unit_filter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/unit_filter.cpp b/src/unit_filter.cpp index 8498fb0af7c3..07779c297683 100644 --- a/src/unit_filter.cpp +++ b/src/unit_filter.cpp @@ -231,6 +231,12 @@ bool basic_unit_filter_impl::matches(const unit & u, const map_location& loc, co bool basic_unit_filter_impl::internal_matches_filter(const unit & u, const map_location& loc) const { + //We don't support name= becasue it casues oos since it depends on the translations + //It is for example possible that 2 units have the same name in one lanugage but not in aother + //Also note that translations are currently broken in mp (see this http://gna.org/bugs/?22918 and related bugreports) + if (!vcfg["name"].empty()) { + ERR_CF << "'name' is not supported in standart unit filters\n"; + } if (!vcfg["id"].empty()) { std::vector id_list = utils::split(vcfg["id"]); if (std::find(id_list.begin(), id_list.end(), u.id()) == id_list.end()) { From fd939cee76c47207db73f71a8194a3d2611f7252 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 10:05:08 -0500 Subject: [PATCH 33/57] Unit filters: move name warning to constructor and suggest alternatives --- src/unit_filter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/unit_filter.cpp b/src/unit_filter.cpp index 07779c297683..77924f644378 100644 --- a/src/unit_filter.cpp +++ b/src/unit_filter.cpp @@ -116,6 +116,12 @@ class basic_unit_filter_impl : public unit_filter_abstract_impl { , cond_children_() , cond_child_types_() { + // We don't support name= becasue it causes OOS since it depends on the translations + // It is for example possible that 2 units have the same name in one lanugage but not in another + // Also note that translations are currently broken in mp (see this http://gna.org/bugs/?22918 and related bugreports) + if (!vcfg["name"].empty()) { + ERR_CF << "'name' is not supported in standard unit filters - use 'id' or 'role' instead.\n"; + } // Handle [and], [or], and [not] with in-order precedence vconfig::all_children_iterator cond = vcfg.ordered_begin(); vconfig::all_children_iterator cond_end = vcfg.ordered_end(); @@ -231,12 +237,6 @@ bool basic_unit_filter_impl::matches(const unit & u, const map_location& loc, co bool basic_unit_filter_impl::internal_matches_filter(const unit & u, const map_location& loc) const { - //We don't support name= becasue it casues oos since it depends on the translations - //It is for example possible that 2 units have the same name in one lanugage but not in aother - //Also note that translations are currently broken in mp (see this http://gna.org/bugs/?22918 and related bugreports) - if (!vcfg["name"].empty()) { - ERR_CF << "'name' is not supported in standart unit filters\n"; - } if (!vcfg["id"].empty()) { std::vector id_list = utils::split(vcfg["id"]); if (std::find(id_list.begin(), id_list.end(), u.id()) == id_list.end()) { From 18bcd519e0dd9de9f411e0bb1aecd77f555629eb Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 10:18:00 -0500 Subject: [PATCH 34/57] XCode: Suppress warnings about unknown warnings --- projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj b/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj index 4a43b0b1e7f3..50744b8043c5 100644 --- a/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj +++ b/projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj @@ -5735,7 +5735,6 @@ "$(OTHER_CFLAGS)", "-isystem", ./Headers, - "-Wno-unused-local-typedefs", ); PRODUCT_NAME = Wesnoth; SDKROOT = ""; @@ -5837,7 +5836,11 @@ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ./lib; ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "-Wall"; + OTHER_CFLAGS = ( + "-Wall", + "-Wno-unused-local-typedefs", + "-Wno-unknown-warning-option", + ); OTHER_LDFLAGS = ( "-lz", "-lbz2", From 708af564095390490048d04fbd40709cbcda9185 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 13:47:49 -0500 Subject: [PATCH 35/57] Fix function name typo --- src/scripting/game_lua_kernel.cpp | 2 +- src/scripting/lua_api.cpp | 2 +- src/scripting/lua_api.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripting/game_lua_kernel.cpp b/src/scripting/game_lua_kernel.cpp index f863c7ef9e10..088602dcd84e 100644 --- a/src/scripting/game_lua_kernel.cpp +++ b/src/scripting/game_lua_kernel.cpp @@ -4772,7 +4772,7 @@ void game_lua_kernel::apply_effect(const std::string& name, unit& u, const confi return; } // Stack: effect_func - lua_unit* lu = LuaW_pushlocalunit(L, u); + lua_unit* lu = luaW_pushlocalunit(L, u); // Stack: effect_func, unit lua_pushvalue(L, -2); // Stack: effect_func, unit, effect_func diff --git a/src/scripting/lua_api.cpp b/src/scripting/lua_api.cpp index d427089d4475..9c74fbf033bb 100644 --- a/src/scripting/lua_api.cpp +++ b/src/scripting/lua_api.cpp @@ -196,7 +196,7 @@ unit& luaW_checkunit(lua_State *L, int index, bool only_on_map) return *u; } -lua_unit* LuaW_pushlocalunit(lua_State *L, unit& u) +lua_unit* luaW_pushlocalunit(lua_State *L, unit& u) { lua_unit* res = new(lua_newuserdata(L, sizeof(lua_unit))) lua_unit(u); lua_pushlightuserdata(L, getunitKey); diff --git a/src/scripting/lua_api.hpp b/src/scripting/lua_api.hpp index 868086366be0..9d616f9b1bc4 100644 --- a/src/scripting/lua_api.hpp +++ b/src/scripting/lua_api.hpp @@ -45,7 +45,7 @@ bool luaW_pcall(lua_State *L, int nArgs, int nRets, bool allow_wml_error = false */ unit& luaW_checkunit(lua_State *L, int index, bool only_on_map = false); class lua_unit; -lua_unit* LuaW_pushlocalunit(lua_State *L, unit& u); +lua_unit* luaW_pushlocalunit(lua_State *L, unit& u); struct map_location; /** From afd53cf6a1b20b9f5efc6143274faa888a308a3f Mon Sep 17 00:00:00 2001 From: Robert Wallace Date: Fri, 12 Feb 2016 23:45:09 -0500 Subject: [PATCH 36/57] Fixed deprecated code in ANL --- .../ANL_utils/ANL_leader_options.cfg | 31 +++++--- .../ANL_utils/ANL_research_options.cfg | 15 ++-- .../ANL_utils/ANL_special_macros.cfg | 3 +- .../ANL_utils/ANL_worker_options.cfg | 76 ++++++++++++++----- 4 files changed, 87 insertions(+), 38 deletions(-) diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg index db9eed51f65f..e629e1753586 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_leader_options.cfg @@ -71,7 +71,8 @@ #define SHARE_FARMING_KNOWLEDGE_OPTION TARGET_SIDE [option] - message= {MENU_IMG_TXT "items/flower4.png" $diplo_msg[{TARGET_SIDE}].farming} + image = "items/flower4.png" + message = $diplo_msg[{TARGET_SIDE}].farming [show_if] [variable] name=player_$side_number|.farming.target @@ -109,7 +110,8 @@ #define SHARE_MINING_KNOWLEDGE_OPTION TARGET_SIDE [option] - message= {MENU_IMG_TXT "items/gold-coins-small.png" $diplo_msg[{TARGET_SIDE}].mining} + image = "items/gold-coins-small.png" + message = $diplo_msg[{TARGET_SIDE}].mining [show_if] [variable] name=player_$side_number|.mining.target @@ -147,7 +149,8 @@ #define SHARE_WARFARE_KNOWLEDGE_OPTION TARGET_SIDE [option] - message= {MENU_IMG_TXT "wesnoth-icon.png" $diplo_msg[{TARGET_SIDE}].warfare} + image = "wesnoth-icon.png" + message = $diplo_msg[{TARGET_SIDE}].warfare [show_if] [variable] name=player_$side_number|.warfare.target @@ -307,8 +310,9 @@ Share knowledge of warfare" # Giving Money [option] - message= {MENU_IMG_TXT "items/gold-coins-small.png" ( _ "Donate Funds -Give 20 gold to another player")} + image = "items/gold-coins-small.png" + message = _ "Donate Funds +Give 20 gold to another player" [command] [set_variable] name=finished_suboptions @@ -351,8 +355,9 @@ Give 20 gold to another player")} # Sharing Knowledge [option] - message= {MENU_IMG_TXT "items/book4.png" ( _ "Share Knowledge -Help an ally with their research")} + image = "items/book4.png" + message = _ "Share Knowledge +Help an ally with their research" [command] [set_variable] name=finished_suboptions @@ -369,7 +374,7 @@ Help an ally with their research")} [message] caption= _ "Diplomatic Options" speaker=unit - image=items/book4.png + image= "items/book4.png" message= _ "Who will you share knowledge with?" [option] @@ -408,9 +413,10 @@ Help an ally with their research")} # Dwarves [option] - message= {MENU_IMG_TXT "units/dwarves/lord.png~TC(1,magenta)" ( _ "Negotiate with the Dwarves + image = "units/dwarves/lord.png~TC(1,magenta)" + message = _ "Negotiate with the Dwarves Lets you recruit a Dwarvish unit -Negotiation Progress: $player_$side_number|.leader_option_1.progress|/$player_$side_number|.leader_option_1.target")} +Negotiation Progress: $player_$side_number|.leader_option_1.progress|/$player_$side_number|.leader_option_1.target" [show_if] [variable] name=player_$side_number|.ally_1 @@ -463,9 +469,10 @@ Negotiation Progress: $player_$side_number|.leader_option_1.progress|/$player_$s # Elves [option] - message= {MENU_IMG_TXT "units/elves-wood/marshal.png~TC(1,magenta)" ( _ "Negotiate with the Elves + image = "units/elves-wood/marshal.png~TC(1,magenta)" + message = _ "Negotiate with the Elves Lets you recruit an Elvish unit -Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$side_number|.leader_option_2.target")} +Negotiation Progress: $player_$side_number|.leader_option_2.progress|/$player_$side_number|.leader_option_2.target" [show_if] [variable] name=player_$side_number|.ally_5 diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg index 0ce04d40266b..5ffd0548d112 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg @@ -154,9 +154,10 @@ Our mines produce $player_$side_number|.mining.gold|g # Farming [option] - message= {MENU_IMG_TXT "items/flower4.png" ( _ "Agriculture + image = "items/flower4.png" + message = _ "Agriculture Farmers produce +1 gold -Study Progress: $player_$side_number|.farming.progress|/$player_$side_number|.farming.target")} +Study Progress: $player_$side_number|.farming.progress|/$player_$side_number|.farming.target" [command] {TARGET_RESEARCH_COMMAND agriculture ( _ "agriculture")} [/command] @@ -165,9 +166,10 @@ Study Progress: $player_$side_number|.farming.progress|/$player_$side_number|.fa # Mining [option] - message= {MENU_IMG_TXT "items/gold-coins-small.png" ( _ "Mining + image = "items/gold-coins-small.png" + message = _ "Mining Miners produce +1 gold -Study Progress: $player_$side_number|.mining.progress|/$player_$side_number|.mining.target")} +Study Progress: $player_$side_number|.mining.progress|/$player_$side_number|.mining.target" [command] {TARGET_RESEARCH_COMMAND mining ( _ "mining")} [/command] @@ -176,9 +178,10 @@ Study Progress: $player_$side_number|.mining.progress|/$player_$side_number|.min #Warfare [option] - message= {MENU_IMG_TXT "wesnoth-icon.png" ( _ "Warfare + image = "wesnoth-icon.png" + message = _ "Warfare Allows you to recruit a new type of unit -Study Progress: $player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target")} +Study Progress: $player_$side_number|.warfare.progress|/$player_$side_number|.warfare.target" [show_if] [variable] name=player_$side_number|.troops diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_special_macros.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_special_macros.cfg index ce625f6d2b85..1b20851c39fc 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_special_macros.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_special_macros.cfg @@ -127,7 +127,8 @@ #define PICK_RECRUIT_OPTION UNIT_IMAGE UNIT_TYPE_STRING UNIT_TYPE_NAME_STRING VAR [option] - message={MENU_IMG_TXT {UNIT_IMAGE} {UNIT_TYPE_NAME_STRING}} + image = {UNIT_IMAGE} + message = {UNIT_TYPE_NAME_STRING} [show_if] [variable] name=player_$side_number|.{VAR} diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg index 6afefaa45694..8f25ed3a4c6c 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg @@ -62,7 +62,9 @@ message= _ "Nothing" # Convert to grassland [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Convert to Grassland" + "") ("" + _ "Cost: 0g" + "")} + image = "terrain/grass/green6.png" + message= "" + _ "Plant Farm" + "" + description = "" + _ "Cost: 0g" + "" {ANL_SHOW_IF ("Peasant") "Re"} [command] {COMPLETE_ACTION 0} @@ -79,7 +81,9 @@ message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ " # Plant Farm [option] -message= {MENU_IMG_TXT2 "terrain/embellishments/farm-veg-spring-icon.png" ("" + _ "Plant Farm" + "") ("" + _ "Cost: 0g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Plant Farm" + "" +description = "" + _ "Cost: 0g" + "" {ANL_SHOW_IF ("Peasant") "Gg,Gs"} [command] {COMPLETE_ACTION 0} @@ -93,7 +97,9 @@ message= {MENU_IMG_TXT2 "terrain/embellishments/farm-veg-spring-icon.png" ("" + _ "Build Village" + "") ("" + _ "Cost: 15g" + "")} +image = "terrain/village/human-tile.png" +message = "" + _ "Build Village" + "" +description = "" + _ "Cost: 15g" + "" {ANL_SHOW_IF ("Peasant") "Gg,Gs"} [command] [if] @@ -115,7 +121,9 @@ message= {MENU_IMG_TXT2 "terrain/village/human-tile.png" ("" # Build Castle [option] -message= {MENU_IMG_TXT2 "terrain/castle/castle-tile.png" ("" + _ "Build Castle" + "") ("" + _ "Cost: 6g" + "")} +image = "terrain/castle/castle-tile.png" +message = "" + _ "Build Castle" + "" +description = "" + _ "Cost: 6g" + "" {ANL_SHOW_IF ("Peasant") "Gg,Gs"} [command] [if] @@ -136,7 +144,9 @@ message= {MENU_IMG_TXT2 "terrain/castle/castle-tile.png" ("" # Flood [option] -message= {MENU_IMG_TXT2 "terrain/water/coast-tile.png" ("" + _ "Flood the Field" + "") ("" + _ "Cost: 4g" + "")} +image = "terrain/water/coast-tile.png" +message = "" + _ "Flood the Field" + "" +description = "" + _ "Cost: 4g" + "" {ANL_SHOW_IF ("Peasant") "Gg,Gs"} [command] [if] @@ -159,7 +169,9 @@ message= {MENU_IMG_TXT2 "terrain/water/coast-tile.png" ("" + # Plant Saplings [option] -message= {MENU_IMG_TXT2 "terrain/forest/pine-tile.png" ("" + _ "Plant Saplings" + "") ("" + _ "Cost: 1g" + "")} +image = "terrain/forest/pine-tile.png" +message = "" + _ "Plant Saplings" + "" +description = "" + _ "Cost: 1g" + "" {ANL_SHOW_IF ("Peasant") "Gg,Gs"} [command] [if] @@ -185,7 +197,9 @@ message= {MENU_IMG_TXT2 "terrain/forest/pine-tile.png" ("" + # Chop Down Forest [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Chop Down Forest" + "") ("" + _ "Earns: 1g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Chop Down Forest" + "" +description = "" + _ "Earns: 1g" + "" {ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"} [command] [set_variable] @@ -240,7 +254,9 @@ message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ " # Build Gold Mine [option] -message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" ("" + _ "Build Mine" + "") ("" + _ "Cost: 25g" + "")} +image = "terrain/village/human-hills-tile.png" +message = "" + _ "Build Mine" + "" +description = "" + _ "Cost: 25g" + "" {ANL_SHOW_IF ("Peasant") "Hh"} [command] [if] @@ -265,7 +281,9 @@ message= {MENU_IMG_TXT2 "terrain/village/human-hills-tile.png" ("" + _ "Build Mine" + "") ("" + _ "Cost: 25g" + "")} +image = "terrain/village/human-mountain-tile.png" +message = "" + _ "Build Mine" + "" +description = "" + _ "Cost: 25g" + "" {ANL_SHOW_IF ("Peasant") "Mm"} [command] [if] @@ -290,7 +308,9 @@ message= {MENU_IMG_TXT2 "terrain/village/human-mountain-tile.png" ("" + _ "Make a Ford" + "") ("" + _ "Cost: 3g" + "")} +image = "terrain/water/ford.png" +message = "" + _ "Make a Ford" + "" +description = "" + _ "Cost: 3g" + "" {ANL_SHOW_IF ("Peasant") "Ww"} [command] [if] @@ -316,7 +336,9 @@ message= {MENU_IMG_TXT2 "terrain/water/ford.png" ("" + _ "Ma # Landfill [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Landfill" + "") ("" + _ "Cost: 5g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Landfill" + "" +description = "" + _ "Cost: 5g" + "" {ANL_SHOW_IF ("Peasant") "Ww"} [command] [if] @@ -345,7 +367,9 @@ message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ " # Destroy the Ford [option] -message= {MENU_IMG_TXT2 "terrain/water/coast-tile.png" ("" + _ "Destroy the Ford" + "") ("" + _ "Cost: 0g" + "")} +image = "terrain/water/coast-tile.png" +message = "" + _ "Destroy the Ford" + "" +description = "" + _ "Cost: 0g" + "" {ANL_SHOW_IF ("Peasant") "Wwf"} [command] {COMPLETE_ACTION 0} @@ -368,7 +392,9 @@ message= {MENU_IMG_TXT2 "terrain/water/coast-tile.png" ("" + # Landfill [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Landfill" + "") ("" + _ "Cost: 1g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Landfill" + "" +description = "" + _ "Cost: 1g" + "" {ANL_SHOW_IF ("Peasant") "Wwf"} [command] [if] @@ -397,7 +423,9 @@ message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ " # Break Up Cave [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Smash Cave Floor" + "") ("" + _ "Cost: 2g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Smash Cave Floor" + "" +description = "" + _ "Cost: 2g" + "" {ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"} [command] [if] @@ -420,7 +448,9 @@ message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ " # Convert Cave To Hills [option] -message= {MENU_IMG_TXT2 "terrain/hills/regular2.png" ("" + _ "Smash Cave Floor" + "") ("" + _ "Cost: 3g" + "")} +image = "terrain/hills/regular2.png" +message = "" + _ "Smash Cave Floor" + "" +description = "" + _ "Cost: 3g" + "" {ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"} [command] [if] @@ -443,7 +473,9 @@ message= {MENU_IMG_TXT2 "terrain/hills/regular2.png" ("" + _ # Harvest Cave Mushrooms [option] -message= {MENU_IMG_TXT2 "terrain/cave/floor.png" ("" + _ "Harvest Mushrooms" + "") ("" + _ "Earns: 3g" + "")} +image = "terrain/cave/floor.png" +message = "" + _ "Harvest Mushrooms" + "" +description = "" + _ "Earns: 3g" + "" {ANL_SHOW_IF ("Peasant") "Uu^Uf"} [command] [set_variable] @@ -491,7 +523,9 @@ message= {MENU_IMG_TXT2 "terrain/cave/floor.png" ("" + _ "Ha # Build Keep [option] -message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" ("" + _ "Build a Keep" + "") ("" + _ "Cost: 6g" + "")} +image = "terrain/castle/keep-tile.png" +message = "" + _ "Build a Keep" + "" +description = "" + _ "Cost: 6g" + "" {ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"} [command] [if] @@ -515,7 +549,9 @@ message= {MENU_IMG_TXT2 "terrain/castle/keep-tile.png" ("" + # Establish University [option] -message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" ("" + _ "Establish University" + "") ("" + _ "Cost: 7g" + "")} +image = "terrain/village/elven-tile.png" +message = "" + _ "Establish University" + "" +description = "" + _ "Cost: 7g" + "" {ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"} [command] [if] @@ -540,7 +576,9 @@ message= {MENU_IMG_TXT2 "terrain/village/elven-tile.png" ("" # Clear Rubble [option] -message= {MENU_IMG_TXT2 "terrain/grass/green6.png" ("" + _ "Clear the Ground" + "") ("" + _ "Cost: 0g" + "")} +image = "terrain/grass/green6.png" +message = "" + _ "Clear the Ground" + "" +description = "" + _ "Cost: 0g" + "" {ANL_SHOW_IF ("Peasant") "Rd"} [command] {COMPLETE_ACTION (-0)} From df45dd9aab034ff08c0af27ac087bf986dddc603 Mon Sep 17 00:00:00 2001 From: Robert Wallace Date: Fri, 12 Feb 2016 23:47:23 -0500 Subject: [PATCH 37/57] Update about.cfg --- data/core/about.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/core/about.cfg b/data/core/about.cfg index df8323d94403..04be2810bb86 100644 --- a/data/core/about.cfg +++ b/data/core/about.cfg @@ -1339,6 +1339,9 @@ name = "Robert Spencer" comment = "2012 Google Code-in Students' Micro AI development" [/entry] + [entry] + name = "Robert Wallace (Robertdebrus)" + [/entry] [entry] name = "Rocco J Carello (rogue)" [/entry] From 0484fdd4149fc794d59517f7a19873bbb5fe6ad6 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Tue, 23 Feb 2016 20:32:12 +0100 Subject: [PATCH 38/57] fix quit confirmation promt in editor previously it showed the default "do you want to quit the game" message when leaving the editor. using the red cross in the corner. This also changes some dublication of the "Do you really want to quit?" translatable string in the c++ code. --- src/controller_base.hpp | 2 +- src/editor/controller/editor_controller.cpp | 19 ++++++------ src/editor/controller/editor_controller.hpp | 7 +++-- src/gui/dialogs/synced_choice_wait.cpp | 8 ++---- src/hotkey/command_executor.cpp | 5 ++-- src/play_controller.cpp | 1 + src/play_controller.hpp | 2 +- src/quit_confirmation.cpp | 32 +++++++++------------ src/quit_confirmation.hpp | 18 ++++++++---- 9 files changed, 50 insertions(+), 44 deletions(-) diff --git a/src/controller_base.hpp b/src/controller_base.hpp index 4a3d8b137abf..5a6f70c2cb28 100644 --- a/src/controller_base.hpp +++ b/src/controller_base.hpp @@ -54,7 +54,7 @@ namespace hotkey { class command_executor; } namespace soundsource { class manager; } -class controller_base : public events::sdl_handler, quit_confirmation +class controller_base : public events::sdl_handler { public: controller_base(const config& game_config, CVideo& video); diff --git a/src/editor/controller/editor_controller.cpp b/src/editor/controller/editor_controller.cpp index 897dcb064a65..22e8fc10262a 100644 --- a/src/editor/controller/editor_controller.cpp +++ b/src/editor/controller/editor_controller.cpp @@ -63,6 +63,7 @@ namespace editor { editor_controller::editor_controller(const config &game_config, CVideo& video) : controller_base(game_config, video) , mouse_handler_base() + , quit_confirmation(boost::bind(&editor_controller::quit_confirm, this)) , active_menu_(editor::MAP) , reports_(new reports()) , gui_(new editor_display(editor::get_dummy_display_context(), video, *reports_, controller_base::get_theme(game_config, "editor"), config())) @@ -199,7 +200,7 @@ void editor_controller::do_screenshot(const std::string& screenshot_filename /* } } -void editor_controller::quit_confirm(EXIT_STATUS mode) +bool editor_controller::quit_confirm() { std::string modified; size_t amount = context_manager_->modified_maps(modified); @@ -213,11 +214,7 @@ void editor_controller::quit_confirm(EXIT_STATUS mode) message = _("Do you really want to quit? The following maps were modified and all changes since the last save will be lost:"); message += modified; } - const int res = gui2::show_message(gui().video(), _("Quit"), message, gui2::tmessage::yes_no_buttons); - if(res != gui2::twindow::CANCEL) { - do_quit_ = true; - quit_mode_ = mode; - } + return gui2::show_message(gui().video(), _("Quit"), message, gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; } void editor_controller::custom_tods_dialog() @@ -720,10 +717,16 @@ bool editor_controller::execute_command(const hotkey::hotkey_command& cmd, int i return true; case HOTKEY_QUIT_GAME: - quit_confirm(EXIT_NORMAL); + if(quit_confirm()) { + do_quit_ = true; + quit_mode_ = EXIT_NORMAL; + } return true; case HOTKEY_QUIT_TO_DESKTOP: - quit_confirm(EXIT_QUIT_TO_DESKTOP); + if(quit_confirm()) { + do_quit_ = true; + quit_mode_ = EXIT_QUIT_TO_DESKTOP; + } return true; case TITLE_SCREEN__RELOAD_WML: context_manager_->save_all_maps(true); diff --git a/src/editor/controller/editor_controller.hpp b/src/editor/controller/editor_controller.hpp index df9495ee167e..175a1c4e7ba3 100644 --- a/src/editor/controller/editor_controller.hpp +++ b/src/editor/controller/editor_controller.hpp @@ -72,7 +72,8 @@ enum menu_type { class editor_controller : public controller_base, public hotkey::command_executor_default, public events::mouse_handler_base, - private boost::noncopyable + private boost::noncopyable, + quit_confirmation { public: /** @@ -94,8 +95,8 @@ class editor_controller : public controller_base, /** Process a hotkey quit command */ void hotkey_quit(); - /** Show a quit confirmation dialog and if confirmed quit with the given exit status */ - void quit_confirm(EXIT_STATUS status); + /** Show a quit confirmation dialog and returns true if the user pressed 'yes' */ + bool quit_confirm(); /** Display the settings dialog, used to control e.g. the lighting settings */ void custom_tods_dialog(); diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index fa0629181e01..53a16adef0eb 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -19,7 +19,7 @@ #include "gui/widgets/button.hpp" #include "gui/widgets/settings.hpp" #include "gui/widgets/window.hpp" - +#include "quit_confirmation.hpp" #include "message.hpp" #include "../../game_end_exceptions.hpp" @@ -97,11 +97,9 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name) } } -void tsynced_choice_wait::on_btn_quit_game(CVideo& video) +void tsynced_choice_wait::on_btn_quit_game(CVideo&) { - const int res = gui2::show_message(video, _("Quit"), - _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons); - if (res != gui2::twindow::CANCEL) { + if (quit_confirmation::default_promt()) { throw_quit_game_exception(); } } diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index c21146b735fe..b0d29a374555 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -30,6 +30,7 @@ #include "preferences.hpp" #include "game_end_exceptions.hpp" #include "display.hpp" +#include "quit_confirmation.hpp" #include #include @@ -697,7 +698,7 @@ void command_executor_default::map_screenshot() } void command_executor_default::quit_to_desktop() { - if(gui2::show_message(get_video(), _("Quit"), _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL) { + if(quit_confirmation::default_promt()) { throw CVideo::quit(); } } @@ -707,7 +708,7 @@ void command_executor::quit_to_desktop() } void command_executor_default::quit_to_main_menu() { - if(gui2::show_message(get_video(), _("Quit"), _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL) { + if(quit_confirmation::default_promt()) { throw_quit_game_exception(); } } diff --git a/src/play_controller.cpp b/src/play_controller.cpp index aefbba57d480..826d1772bd86 100644 --- a/src/play_controller.cpp +++ b/src/play_controller.cpp @@ -152,6 +152,7 @@ play_controller::play_controller(const config& level, saved_game& state_of_game, : controller_base(game_config, video) , observer() , savegame_config() + , quit_confirmation() , ticks_(SDL_GetTicks()) , tdata_(tdata) , gamestate_() diff --git a/src/play_controller.hpp b/src/play_controller.hpp index 5a0803f29148..7d9af44dcb2d 100644 --- a/src/play_controller.hpp +++ b/src/play_controller.hpp @@ -80,7 +80,7 @@ namespace wb { // Holds gamestate related objects class game_state; -class play_controller : public controller_base, public events::observer, public savegame::savegame_config +class play_controller : public controller_base, public events::observer, public savegame::savegame_config, quit_confirmation { public: play_controller(const config& level, saved_game& state_of_game, diff --git a/src/quit_confirmation.cpp b/src/quit_confirmation.cpp index 28dcaaae4183..b7744d624217 100644 --- a/src/quit_confirmation.cpp +++ b/src/quit_confirmation.cpp @@ -19,31 +19,27 @@ #include "gui/widgets/window.hpp" #include "resources.hpp" -int quit_confirmation::count_ = 0; +std::vector quit_confirmation::blockers_ = std::vector(); bool quit_confirmation::open_ = false; void quit_confirmation::quit() { - if(count_ != 0 && !open_) + if(!open_) { - quit(CVideo::get_singleton()); - } - else - { - throw CVideo::quit(); + open_ = true; + BOOST_REVERSE_FOREACH(quit_confirmation* blocker, blockers_) + { + if(!blocker->promt_()) { + open_ = false; + return; + } + } + open_ = false; } + throw CVideo::quit(); } -void quit_confirmation::quit(CVideo& video) +bool quit_confirmation::default_promt() { - assert(!open_); - open_ = true; - const int res = gui2::show_message(video, _("Quit"), - _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons); - open_ = false; - if(res != gui2::twindow::CANCEL) { - throw CVideo::quit(); - } else { - return; - } + return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; } diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index 8effb2b1a2cb..5ee7367461cc 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -18,6 +18,9 @@ class CVideo; #include +#include +#include +#include /** * Implements a quit confirmation dialog. @@ -28,9 +31,8 @@ class CVideo; class quit_confirmation { public: - quit_confirmation() { ++count_; } - quit_confirmation(const quit_confirmation&) { ++count_; } - ~quit_confirmation() { --count_; assert(count_ >= 0); } + quit_confirmation(const boost::function& promt = &quit_confirmation::default_promt) : promt_(promt) { blockers_.push_back(this); } + ~quit_confirmation() { blockers_.pop_back(); } /** * Shows the quit confirmation if needed. @@ -39,11 +41,15 @@ class quit_confirmation * displayed. */ static void quit(); - static void quit(CVideo& video ); - + static bool default_promt(); private: - static int count_; + //noncopyable + quit_confirmation( const quit_confirmation& ); + const quit_confirmation& operator=( const quit_confirmation& ); + static std::vector blockers_; static bool open_; + + boost::function promt_; }; #endif From baed863df07360f8753c81d160c3ea202da681c5 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 15:40:49 -0500 Subject: [PATCH 39/57] Don't include config.hpp when possible Instead, try to forward-declare it only. --- src/addon/info.cpp | 1 + src/addon/info.hpp | 3 ++- src/addon/state.cpp | 1 + src/addon/state.hpp | 1 + src/editor/palette/common_palette.hpp | 2 +- src/editor/toolkit/editor_toolkit.hpp | 3 ++- src/game_classification.cpp | 1 + src/game_classification.hpp | 4 +++- src/game_end_exceptions.cpp | 7 +++++++ src/game_end_exceptions.hpp | 10 +++------- src/gui/dialogs/addon_list.hpp | 1 - src/gui/dialogs/campaign_selection.hpp | 1 - src/gui/dialogs/core_selection.hpp | 2 +- src/gui/dialogs/editor/editor_edit_scenario.hpp | 1 - src/gui/dialogs/editor/editor_edit_side.hpp | 1 - src/gui/dialogs/lobby_player_info.hpp | 1 - src/help/help.cpp | 2 ++ src/help/help_impl.hpp | 3 +-- src/hotkey/hotkey_item.cpp | 1 + src/hotkey/hotkey_item.hpp | 3 ++- src/network_asio.hpp | 3 ++- src/replay.hpp | 2 +- src/replay_helper.hpp | 4 ++-- src/scripting/lua_api.hpp | 1 - src/serialization/schema_validator.hpp | 3 ++- src/synced_checkup.hpp | 2 +- src/synced_commands.hpp | 4 +++- 27 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/addon/info.cpp b/src/addon/info.cpp index a0e5e13e6694..5104b7323ffe 100644 --- a/src/addon/info.cpp +++ b/src/addon/info.cpp @@ -16,6 +16,7 @@ #include "addon/manager.hpp" #include "game_config.hpp" +#include "config.hpp" #include "gettext.hpp" #include "image.hpp" #include "log.hpp" diff --git a/src/addon/info.hpp b/src/addon/info.hpp index 5b563a6a0bb8..fa184f592597 100644 --- a/src/addon/info.hpp +++ b/src/addon/info.hpp @@ -15,14 +15,15 @@ #ifndef ADDON_INFO_HPP_INCLUDED #define ADDON_INFO_HPP_INCLUDED -#include "config.hpp" #include "version.hpp" #include "addon/validation.hpp" #include +#include struct addon_info; +class config; typedef std::map addons_list; struct addon_info diff --git a/src/addon/state.cpp b/src/addon/state.cpp index 20803c5f0502..46d2ca44a331 100644 --- a/src/addon/state.cpp +++ b/src/addon/state.cpp @@ -13,6 +13,7 @@ */ #include "addon/state.hpp" +#include "config.hpp" #include "addon/manager.hpp" #include "font.hpp" diff --git a/src/addon/state.hpp b/src/addon/state.hpp index 1c69440c144a..ffaf4739d627 100644 --- a/src/addon/state.hpp +++ b/src/addon/state.hpp @@ -16,6 +16,7 @@ #define ADDON_STATE_HPP_INCLUDED #include "addon/info.hpp" +#include /** Defines various add-on installation statuses. */ enum ADDON_STATUS { diff --git a/src/editor/palette/common_palette.hpp b/src/editor/palette/common_palette.hpp index 76ce31d3bd56..3b05e91fbabe 100644 --- a/src/editor/palette/common_palette.hpp +++ b/src/editor/palette/common_palette.hpp @@ -16,10 +16,10 @@ #define COMMON_PALETTES_H_INCLUDED #include "display.hpp" -#include "config.hpp" #include "gui/widgets/widget.hpp" struct SDL_Rect; +class config; namespace editor { diff --git a/src/editor/toolkit/editor_toolkit.hpp b/src/editor/toolkit/editor_toolkit.hpp index 0b6bf94b2d91..26ab4961c1fa 100644 --- a/src/editor/toolkit/editor_toolkit.hpp +++ b/src/editor/toolkit/editor_toolkit.hpp @@ -16,7 +16,6 @@ #define EDITOR_TOOLKIT_H_INCLUDED -#include "config.hpp" #include "editor/map/context_manager.hpp" #include "editor/palette/palette_manager.hpp" #include "editor/toolkit/brush.hpp" @@ -24,6 +23,8 @@ #include +class config; + namespace editor { diff --git a/src/game_classification.cpp b/src/game_classification.cpp index 9c1850abd5d8..5ac5be29ab15 100644 --- a/src/game_classification.cpp +++ b/src/game_classification.cpp @@ -15,6 +15,7 @@ #include "global.hpp" #include "game_classification.hpp" #include "game_config.hpp" +#include "config.hpp" #include "util.hpp" #include "serialization/string_utils.hpp" #include "log.hpp" diff --git a/src/game_classification.hpp b/src/game_classification.hpp index bfb81b1382dd..48d03900a9e5 100644 --- a/src/game_classification.hpp +++ b/src/game_classification.hpp @@ -15,9 +15,11 @@ #ifndef GAME_CLASSIFICATION_HPP_INCLUDED #define GAME_CLASSIFICATION_HPP_INCLUDED -#include "config.hpp" #include "make_enum.hpp" #include "savegame_config.hpp" +#include + +class config; /// The default difficulty setting for campaigns. extern const std::string DEFAULT_DIFFICULTY; diff --git a/src/game_end_exceptions.cpp b/src/game_end_exceptions.cpp index 96fcda6e99e1..29a3c792aea7 100644 --- a/src/game_end_exceptions.cpp +++ b/src/game_end_exceptions.cpp @@ -49,3 +49,10 @@ void end_level_data::read(const config& cfg) proceed_to_next_level = cfg["proceed_to_next_level"].to_bool(true); is_victory = cfg["is_victory"].to_bool(true); } + +config end_level_data::to_config() const +{ + config r; + write(r); + return r; +} diff --git a/src/game_end_exceptions.hpp b/src/game_end_exceptions.hpp index a577c396ab15..c0fb20d4bfd2 100644 --- a/src/game_end_exceptions.hpp +++ b/src/game_end_exceptions.hpp @@ -24,13 +24,14 @@ #include "lua_jailbreak_exception.hpp" -#include "config.hpp" #include "make_enum.hpp" #include #include #include +class config; + MAKE_ENUM(LEVEL_RESULT, (VICTORY, "victory") (DEFEAT, "defeat") @@ -103,12 +104,7 @@ struct end_level_data void read(const config& cfg); - config to_config() const - { - config r; - write(r); - return r; - } + config to_config() const; }; inline void throw_quit_game_exception() { diff --git a/src/gui/dialogs/addon_list.hpp b/src/gui/dialogs/addon_list.hpp index 1292ebdd2ad7..0ec4d6432e69 100644 --- a/src/gui/dialogs/addon_list.hpp +++ b/src/gui/dialogs/addon_list.hpp @@ -19,7 +19,6 @@ #include "../widgets/generator.hpp" #include "gui/widgets/pane.hpp" -class config; #include "config.hpp" // needed for config::const_child_itors namespace gui2 diff --git a/src/gui/dialogs/campaign_selection.hpp b/src/gui/dialogs/campaign_selection.hpp index 36045965294d..a892a4dfcf8f 100644 --- a/src/gui/dialogs/campaign_selection.hpp +++ b/src/gui/dialogs/campaign_selection.hpp @@ -17,7 +17,6 @@ #include "gui/dialogs/dialog.hpp" -#include "config.hpp" #include "game_initialization/create_engine.hpp" namespace gui2 diff --git a/src/gui/dialogs/core_selection.hpp b/src/gui/dialogs/core_selection.hpp index 27a8db169979..3748afdf647a 100644 --- a/src/gui/dialogs/core_selection.hpp +++ b/src/gui/dialogs/core_selection.hpp @@ -17,7 +17,7 @@ #include "gui/dialogs/dialog.hpp" -#include "config.hpp" +class config; namespace gui2 { diff --git a/src/gui/dialogs/editor/editor_edit_scenario.hpp b/src/gui/dialogs/editor/editor_edit_scenario.hpp index 1f13c0aecb7a..976daad67da2 100644 --- a/src/gui/dialogs/editor/editor_edit_scenario.hpp +++ b/src/gui/dialogs/editor/editor_edit_scenario.hpp @@ -16,7 +16,6 @@ #define GUI_DIALOGS_EDITOR_EDIT_SCENARIO_HPP_INCLUDED #include "gui/dialogs/dialog.hpp" -#include "config.hpp" namespace gui2 { diff --git a/src/gui/dialogs/editor/editor_edit_side.hpp b/src/gui/dialogs/editor/editor_edit_side.hpp index d47e986ce272..ae235bdb86de 100644 --- a/src/gui/dialogs/editor/editor_edit_side.hpp +++ b/src/gui/dialogs/editor/editor_edit_side.hpp @@ -16,7 +16,6 @@ #define GUI_DIALOGS_EDITOR_EDIT_SIDE_HPP_INCLUDED #include "gui/dialogs/dialog.hpp" -#include "config.hpp" #include "team.hpp" namespace gui2 diff --git a/src/gui/dialogs/lobby_player_info.hpp b/src/gui/dialogs/lobby_player_info.hpp index f77407fef4a0..4225e5696b64 100644 --- a/src/gui/dialogs/lobby_player_info.hpp +++ b/src/gui/dialogs/lobby_player_info.hpp @@ -16,7 +16,6 @@ #define GUI_DIALOGS_LOBBY_PLAYER_INFO_HPP_INCLUDED #include "gui/dialogs/dialog.hpp" -#include "config.hpp" #include "chat_events.hpp" #include "gui/dialogs/lobby/lobby_info.hpp" diff --git a/src/help/help.cpp b/src/help/help.cpp index 66968fa9b08c..341f5e11c30b 100644 --- a/src/help/help.cpp +++ b/src/help/help.cpp @@ -90,6 +90,8 @@ void show_unit_description(CVideo& video, const unit_type &t) help::show_unit_help(video, t.id(), t.show_variations_in_help(), hide_help); } +extern config dummy_cfg; + help_manager::help_manager(const config *cfg) //, gamemap *_map) { game_cfg = cfg == NULL ? &dummy_cfg : cfg; diff --git a/src/help/help_impl.hpp b/src/help/help_impl.hpp index ca916eb2ad4f..74b67654461d 100644 --- a/src/help/help_impl.hpp +++ b/src/help/help_impl.hpp @@ -32,7 +32,6 @@ #ifndef HELP_IMPL_INCLUDED #define HELP_IMPL_INCLUDED -#include "config.hpp" // for config #include "exceptions.hpp" // for error #include "font.hpp" // for line_width, relative_size @@ -44,6 +43,7 @@ #include #include // for SDL_Color, SDL_Surface +class config; class unit_type; class terrain_type_data; typedef boost::shared_ptr tdata_cache; @@ -322,7 +322,6 @@ extern int last_num_encountered_units; extern int last_num_encountered_terrains; extern bool last_debug_state; -extern config dummy_cfg; extern std::vector empty_string_vector; extern const int max_section_level; extern const int title_size; diff --git a/src/hotkey/hotkey_item.cpp b/src/hotkey/hotkey_item.cpp index 85d3c0bdebbd..53eb1b1875a2 100644 --- a/src/hotkey/hotkey_item.cpp +++ b/src/hotkey/hotkey_item.cpp @@ -16,6 +16,7 @@ #include "log.hpp" #include "hotkey_item.hpp" #include "hotkey_command.hpp" +#include "config.hpp" #define GETTEXT_DOMAIN "wesnoth-lib" diff --git a/src/hotkey/hotkey_item.hpp b/src/hotkey/hotkey_item.hpp index 230e8e24f676..a7c1733ce379 100644 --- a/src/hotkey/hotkey_item.hpp +++ b/src/hotkey/hotkey_item.hpp @@ -16,7 +16,6 @@ #ifndef HOTKEY_ITEM_HPP_INCLUDED #define HOTKEY_ITEM_HPP_INCLUDED -#include "config.hpp" #include "SDL_events.h" #include "SDL.h" #include @@ -26,6 +25,8 @@ #include "sdl/keyboard.hpp" #endif +class config; + namespace hotkey { /* forward declarations */ diff --git a/src/network_asio.hpp b/src/network_asio.hpp index d9db59c90511..043fb1d5b248 100644 --- a/src/network_asio.hpp +++ b/src/network_asio.hpp @@ -31,7 +31,8 @@ #include #include #include "exceptions.hpp" -#include "config.hpp" + +class config; namespace network_asio { diff --git a/src/replay.hpp b/src/replay.hpp index 87f185baa7d2..6948a0539757 100644 --- a/src/replay.hpp +++ b/src/replay.hpp @@ -20,7 +20,6 @@ #ifndef REPLAY_H_INCLUDED #define REPLAY_H_INCLUDED -#include "config.hpp" #include "map_location.hpp" #include @@ -31,6 +30,7 @@ class game_display; class terrain_label; class unit_map; class play_controller; +class config; struct time_of_day; class chat_msg { diff --git a/src/replay_helper.hpp b/src/replay_helper.hpp index 2528701245c1..c27e1dda7c6f 100644 --- a/src/replay_helper.hpp +++ b/src/replay_helper.hpp @@ -14,9 +14,9 @@ #ifndef REPLAY_HELPER_H_INCLUDED #define REPLAY_HELPER_H_INCLUDED - -#include "config.hpp" +#include #include +class config; struct map_location; struct time_of_day; diff --git a/src/scripting/lua_api.hpp b/src/scripting/lua_api.hpp index 9d616f9b1bc4..4b212a539290 100644 --- a/src/scripting/lua_api.hpp +++ b/src/scripting/lua_api.hpp @@ -17,7 +17,6 @@ #include #include -#include "config.hpp" // forward declaration of the nested type config::attribute_value is not possible #include "lua_types.hpp" // the luatype typedef #include "unit_ptr.hpp" diff --git a/src/serialization/schema_validator.hpp b/src/serialization/schema_validator.hpp index 26f84e64297f..b02526ee4f60 100644 --- a/src/serialization/schema_validator.hpp +++ b/src/serialization/schema_validator.hpp @@ -18,7 +18,6 @@ #include "serialization/validator.hpp" #include "tools/schema/tag.hpp" -#include "config.hpp" #include "config_cache.hpp" #include "serialization/parser.hpp" @@ -31,6 +30,8 @@ #include #include +class config; + /** @file * One of the realizations of serialization/validator.hpp abstract validator. */ diff --git a/src/synced_checkup.hpp b/src/synced_checkup.hpp index 08c1259f8ab2..b3ac44a11f54 100644 --- a/src/synced_checkup.hpp +++ b/src/synced_checkup.hpp @@ -15,7 +15,7 @@ #ifndef SYNCED_CHECKUP_H_INCLUDED #define SYNCED_CHECKUP_H_INCLUDED -#include "config.hpp" +class config; struct map_location; /** A class to check whether the results that were calculated in the replay match the results calculated during the original game. diff --git a/src/synced_commands.hpp b/src/synced_commands.hpp index 6c1a8e4814f9..49e04986ce29 100644 --- a/src/synced_commands.hpp +++ b/src/synced_commands.hpp @@ -16,9 +16,11 @@ #include #include -#include "config.hpp" #include "utils/boost_function_guarded.hpp" + +class config; + class synced_command { public: /* From c08ea95c72566614a5d44a347e2517f4491d0e70 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 15:41:22 -0500 Subject: [PATCH 40/57] config: make static string constants private --- src/config.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.hpp b/src/config.hpp index 9efa8bb3e7c6..ea39911063c9 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -368,6 +368,7 @@ class config typename V::result_type apply_visitor(const V & visitor) const { return boost::apply_visitor(visitor, value_); } + private: // Special strings. static const std::string s_yes, s_no; static const std::string s_true, s_false; From c0df87a4704924ba8331858e595090a74da1a638 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 09:00:10 +1100 Subject: [PATCH 41/57] Restore a config.hpp include This fixes compilation --- src/help/help_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/help/help_impl.hpp b/src/help/help_impl.hpp index 74b67654461d..a5d24910fc9d 100644 --- a/src/help/help_impl.hpp +++ b/src/help/help_impl.hpp @@ -32,6 +32,7 @@ #ifndef HELP_IMPL_INCLUDED #define HELP_IMPL_INCLUDED +#include "config.hpp" #include "exceptions.hpp" // for error #include "font.hpp" // for line_width, relative_size @@ -43,7 +44,6 @@ #include #include // for SDL_Color, SDL_Surface -class config; class unit_type; class terrain_type_data; typedef boost::shared_ptr tdata_cache; From 56f0c9a99a6d42359db2407acc367f6e5f5863ee Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 09:05:07 +1100 Subject: [PATCH 42/57] Redid c0df87a47049 correctly --- src/help/help_impl.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/help/help_impl.hpp b/src/help/help_impl.hpp index a5d24910fc9d..5bafadf5970e 100644 --- a/src/help/help_impl.hpp +++ b/src/help/help_impl.hpp @@ -32,10 +32,10 @@ #ifndef HELP_IMPL_INCLUDED #define HELP_IMPL_INCLUDED -#include "config.hpp" #include "exceptions.hpp" // for error #include "font.hpp" // for line_width, relative_size +#include #include // for list #include // for operator<<, stringstream, etc #include // for string, allocator, etc @@ -44,6 +44,7 @@ #include #include // for SDL_Color, SDL_Surface +class config; class unit_type; class terrain_type_data; typedef boost::shared_ptr tdata_cache; From c40c2cd9af52d1dbfecbad38684b92ce3dd5ba8b Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 09:06:32 +1100 Subject: [PATCH 43/57] ANL: strip unnecessary wmltools guards and ran wmlindent --- .../ANL_utils/ANL_research_options.cfg | 50 +- .../ANL_utils/ANL_worker_options.cfg | 1119 ++++++++--------- 2 files changed, 579 insertions(+), 590 deletions(-) diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg index 5ffd0548d112..6ba56514482d 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_research_options.cfg @@ -51,31 +51,28 @@ [filter_location] terrain="Gg^Ve,Gg^Vea" [/filter_location] -# wmlindent: start ignoring - [command] - [message] - speaker=unit - caption=_ "Study Complete" -# wmllint: display on - message= _ "Which type of unit would you like to be able to recruit?" -# wmllint: display off -#textdomain wesnoth-units - {PICK_RECRUIT_OPTION ("units/human-loyalists/spearman.png~TC($side_number|,magenta)") "Spearman" _"Spearman" troop_1} - {PICK_RECRUIT_OPTION ("units/human-loyalists/bowman.png~TC($side_number|,magenta)") "Bowman" _"Bowman" troop_2} - {PICK_RECRUIT_OPTION ("units/human-loyalists/fencer.png~TC($side_number|,magenta)") "Fencer" _"Fencer" troop_3} - {PICK_RECRUIT_OPTION ("units/human-loyalists/heavyinfantry.png~TC($side_number|,magenta)") "Heavy Infantryman" _"Heavy Infantryman" troop_4} - {PICK_RECRUIT_OPTION ("units/human-loyalists/sergeant.png~TC($side_number|,magenta)") "Sergeant" _"Sergeant" troop_5} - {PICK_RECRUIT_OPTION ("units/human-loyalists/cavalryman/cavalryman.png~TC($side_number|,magenta)") "Cavalryman" _"Cavalryman" troop_6} - {PICK_RECRUIT_OPTION ("units/human-loyalists/horseman/horseman.png~TC($side_number|,magenta)") "Horseman" _"Horseman" troop_7} -#textdomain wesnoth-anl - [/message] - - [set_variable] - name=player_$side_number|.warfare.troop_available - sub=1 - [/set_variable] - [/command] -# wmlindent: stop ignoring + + [command] + [message] + speaker=unit + caption=_ "Study Complete" + message= _ "Which type of unit would you like to be able to recruit?" + #textdomain wesnoth-units + {PICK_RECRUIT_OPTION ("units/human-loyalists/spearman.png~TC($side_number|,magenta)") "Spearman" _"Spearman" troop_1} + {PICK_RECRUIT_OPTION ("units/human-loyalists/bowman.png~TC($side_number|,magenta)") "Bowman" _"Bowman" troop_2} + {PICK_RECRUIT_OPTION ("units/human-loyalists/fencer.png~TC($side_number|,magenta)") "Fencer" _"Fencer" troop_3} + {PICK_RECRUIT_OPTION ("units/human-loyalists/heavyinfantry.png~TC($side_number|,magenta)") "Heavy Infantryman" _"Heavy Infantryman" troop_4} + {PICK_RECRUIT_OPTION ("units/human-loyalists/sergeant.png~TC($side_number|,magenta)") "Sergeant" _"Sergeant" troop_5} + {PICK_RECRUIT_OPTION ("units/human-loyalists/cavalryman/cavalryman.png~TC($side_number|,magenta)") "Cavalryman" _"Cavalryman" troop_6} + {PICK_RECRUIT_OPTION ("units/human-loyalists/horseman/horseman.png~TC($side_number|,magenta)") "Horseman" _"Horseman" troop_7} + #textdomain wesnoth-anl + [/message] + + [set_variable] + name=player_$side_number|.warfare.troop_available + sub=1 + [/set_variable] + [/command] [/set_menu_item] # Changing Research Target @@ -124,7 +121,6 @@ [/variable] [do] - # wmlindent: start ignoring [message] speaker=unit caption=_ "Research" @@ -150,7 +146,7 @@ Our mines produce $player_$side_number|.mining.gold|g [/set_variable] [/command] [/option] - # wmlindent: stop ignoring + # Farming [option] diff --git a/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg b/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg index 8f25ed3a4c6c..d69524375b53 100644 --- a/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg +++ b/data/multiplayer/scenarios/ANL_utils/ANL_worker_options.cfg @@ -39,567 +39,560 @@ [/variable] [do] -# wmlindent: start ignoring - [message] - speaker=unit -# wmllint: display on - message= _ "What shall I do my liege?" -# wmllint: display off - -[option] -message= _ "Nothing" - [command] - [set_variable] - name=finished - value=yes - [/set_variable] - [/command] -[/option] - -# ---------------------------------------------- -# FARMLAND - -# Convert to grassland - -[option] - image = "terrain/grass/green6.png" - message= "" + _ "Plant Farm" + "" - description = "" + _ "Cost: 0g" + "" - {ANL_SHOW_IF ("Peasant") "Re"} - [command] - {COMPLETE_ACTION 0} - {MODIFY_TERRAIN Gg $x1 $y1} - [sound] - name=dagger-swish.wav - [/sound] - [/command] -[/option] - -# ---------------------------------------------- -# GRASSLAND - -# Plant Farm - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Plant Farm" + "" -description = "" + _ "Cost: 0g" + "" - {ANL_SHOW_IF ("Peasant") "Gg,Gs"} - [command] - {COMPLETE_ACTION 0} - {MODIFY_TERRAIN Re $x1 $y1} - [sound] - name=entangle.wav - [/sound] - [/command] -[/option] - -# Build Village - -[option] -image = "terrain/village/human-tile.png" -message = "" + _ "Build Village" + "" -description = "" + _ "Cost: 15g" + "" - {ANL_SHOW_IF ("Peasant") "Gg,Gs"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=15 - [/variable] - - [then] - {COMPLETE_ACTION (-15)} - {MODIFY_TERRAIN "Gg^Vh" $x1 $y1} - {ANL_CAPTURE_VILLAGE} - {BUILD_SOUND_1} - [/then] - [/if] - [/command] -[/option] - -# Build Castle - -[option] -image = "terrain/castle/castle-tile.png" -message = "" + _ "Build Castle" + "" -description = "" + _ "Cost: 6g" + "" - {ANL_SHOW_IF ("Peasant") "Gg,Gs"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=6 - [/variable] - - [then] - {COMPLETE_ACTION (-6)} - {MODIFY_TERRAIN "Ch" $x1 $y1} - {BUILD_SOUND_2} - [/then] - [/if] - [/command] -[/option] - -# Flood - -[option] -image = "terrain/water/coast-tile.png" -message = "" + _ "Flood the Field" + "" -description = "" + _ "Cost: 4g" + "" - {ANL_SHOW_IF ("Peasant") "Gg,Gs"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=4 - [/variable] - - [then] - {COMPLETE_ACTION -4} - {MODIFY_TERRAIN "Ww" $x1 $y1} - [sound] - name=water-blast.wav - [/sound] - [/then] - [/if] - [/command] -[/option] - -# Plant Saplings - -[option] -image = "terrain/forest/pine-tile.png" -message = "" + _ "Plant Saplings" + "" -description = "" + _ "Cost: 1g" + "" - {ANL_SHOW_IF ("Peasant") "Gg,Gs"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=1 - [/variable] - - [then] - {COMPLETE_ACTION -1} - {MODIFY_TERRAIN "Gs^Fp" $x1 $y1} - [sound] - name=entangle.wav - [/sound] - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# FOREST - -# Chop Down Forest - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Chop Down Forest" + "" -description = "" + _ "Earns: 1g" + "" - {ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"} - [command] - [set_variable] - name=finished - value=yes - [/set_variable] - - [set_variable] - name=unit.status.worked_this_turn - value=yes - [/set_variable] - [set_variable] - name=unit.moves - value=0 - [/set_variable] - - - [gold] - side=$side_number - amount=1 - [/gold] - - [sound] - name=dagger-swish.wav - [/sound] - [delay] - time=250 - [/delay] - [sound] - name=axe.ogg - [/sound] - [delay] - time=150 - [/delay] - [sound] - name=wose-die.ogg - [/sound] - - {MODIFY_TERRAIN "Gg" $x1 $y1} - - [unstore_unit] - variable=unit - text=1 # wmllint: ignore - red,green,blue=204,204,51 - [/unstore_unit] - [/command] -[/option] - -# ---------------------------------------------- -# HILLS - -# Build Gold Mine - -[option] -image = "terrain/village/human-hills-tile.png" -message = "" + _ "Build Mine" + "" -description = "" + _ "Cost: 25g" + "" - {ANL_SHOW_IF ("Peasant") "Hh"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=25 - [/variable] - - [then] - {COMPLETE_ACTION (-25)} - {MODIFY_TERRAIN "Hh^Vhh" $x1 $y1} - {ANL_CAPTURE_VILLAGE} - {BUILD_SOUND_1} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# MOUNTAINS - -# Build Gold Mine - -[option] -image = "terrain/village/human-mountain-tile.png" -message = "" + _ "Build Mine" + "" -description = "" + _ "Cost: 25g" + "" - {ANL_SHOW_IF ("Peasant") "Mm"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=25 - [/variable] - - [then] - {COMPLETE_ACTION (-25)} - {MODIFY_TERRAIN "Mm^Vhh" $x1 $y1} - {ANL_CAPTURE_VILLAGE} - {BUILD_SOUND_1} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# WATER - -# Make a Ford - -[option] -image = "terrain/water/ford.png" -message = "" + _ "Make a Ford" + "" -description = "" + _ "Cost: 3g" + "" - {ANL_SHOW_IF ("Peasant") "Ww"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=3 - [/variable] - - [then] - {COMPLETE_ACTION (-3)} - [delay] - time=200 - [/delay] - [sound] - name=dagger-swish.wav - [/sound] - {MODIFY_TERRAIN "Wwf" $x1 $y1} - [/then] - [/if] - [/command] -[/option] - -# Landfill - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Landfill" + "" -description = "" + _ "Cost: 5g" + "" - {ANL_SHOW_IF ("Peasant") "Ww"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=5 - [/variable] - - [then] - {COMPLETE_ACTION (-5)} - [delay] - time=200 - [/delay] - [sound] - name=claws.ogg - [/sound] - {MODIFY_TERRAIN "Gg" $x1 $y1} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# FORD - -# Destroy the Ford - -[option] -image = "terrain/water/coast-tile.png" -message = "" + _ "Destroy the Ford" + "" -description = "" + _ "Cost: 0g" + "" - {ANL_SHOW_IF ("Peasant") "Wwf"} - [command] - {COMPLETE_ACTION 0} - [delay] - time=200 - [/delay] - {MODIFY_TERRAIN "Ww" $x1 $y1} - [sound] - name=pincers.ogg - [/sound] - [delay] - time=200 - [/delay] - [sound] - name=water-blast.wav - [/sound] - [/command] -[/option] - -# Landfill - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Landfill" + "" -description = "" + _ "Cost: 1g" + "" - {ANL_SHOW_IF ("Peasant") "Wwf"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=1 - [/variable] - - [then] - {COMPLETE_ACTION (-1)} - [delay] - time=200 - [/delay] - [sound] - name=claws.ogg - [/sound] - {MODIFY_TERRAIN "Gg" $x1 $y1} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# CAVE - -# Break Up Cave - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Smash Cave Floor" + "" -description = "" + _ "Cost: 2g" + "" - {ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=2 - [/variable] - - [then] - {COMPLETE_ACTION (-2)} - [sound] - name=claws.ogg - [/sound] - {MODIFY_TERRAIN "Gg" $x1 $y1} - [/then] - [/if] - [/command] -[/option] - -# Convert Cave To Hills - -[option] -image = "terrain/hills/regular2.png" -message = "" + _ "Smash Cave Floor" + "" -description = "" + _ "Cost: 3g" + "" - {ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=3 - [/variable] - - [then] - {COMPLETE_ACTION (-3)} - [sound] - name=claws.ogg - [/sound] - {MODIFY_TERRAIN "Hh" $x1 $y1} - [/then] - [/if] - [/command] -[/option] - -# Harvest Cave Mushrooms - -[option] -image = "terrain/cave/floor.png" -message = "" + _ "Harvest Mushrooms" + "" -description = "" + _ "Earns: 3g" + "" - {ANL_SHOW_IF ("Peasant") "Uu^Uf"} - [command] - [set_variable] - name=finished - value=yes - [/set_variable] - - [set_variable] - name=unit.status.worked_this_turn - value=yes - [/set_variable] - [set_variable] - name=unit.moves - value=0 - [/set_variable] - - [gold] - side=$side_number - amount=3 - [/gold] - - [sound] - name=dagger-swish.wav - [/sound] - [delay] - time=250 - [/delay] - [sound] - name=axe.ogg - [/sound] - - {MODIFY_TERRAIN "Uu" $x1 $y1} - - [unstore_unit] - variable=unit - text=3 # wmllint: ignore - red,green,blue=204,204,51 - [/unstore_unit] - [/command] -[/option] - -# ---------------------------------------------- -# CASTLE - -# Build Keep - -[option] -image = "terrain/castle/keep-tile.png" -message = "" + _ "Build a Keep" + "" -description = "" + _ "Cost: 6g" + "" - {ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=6 - [/variable] - - [then] - {COMPLETE_ACTION (-6)} - {MODIFY_TERRAIN "Kh" $x1 $y1} - {BUILD_SOUND_2} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# VILLAGE - -# Establish University - -[option] -image = "terrain/village/elven-tile.png" -message = "" + _ "Establish University" + "" -description = "" + _ "Cost: 7g" + "" - {ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"} - [command] - [if] - [variable] - name=worker.gold - greater_than_equal_to=7 - [/variable] - - [then] - {COMPLETE_ACTION (-7)} - {MODIFY_TERRAIN "Gg^Ve" $x1 $y1} - {ANL_CAPTURE_VILLAGE} - {BUILD_SOUND_2} - [/then] - [/if] - [/command] -[/option] - -# ---------------------------------------------- -# RUBBLE - -# Clear Rubble - -[option] -image = "terrain/grass/green6.png" -message = "" + _ "Clear the Ground" + "" -description = "" + _ "Cost: 0g" + "" - {ANL_SHOW_IF ("Peasant") "Rd"} - [command] - {COMPLETE_ACTION (-0)} - [delay] - time=200 - [/delay] - [sound] - name=claws.ogg - [/sound] - {MODIFY_TERRAIN "Gg" $x1 $y1} - [remove_item] - x,y=$x1,$y1 - [/remove_item] - [/command] -[/option] - -[/message] -[/do] -[/while] - -[/command] -[/set_menu_item] + [message] + speaker=unit + message= _ "What shall I do my liege?" + + [option] + message= _ "Nothing" + [command] + [set_variable] + name=finished + value=yes + [/set_variable] + [/command] + [/option] + + # ---------------------------------------------- + # FARMLAND + + # Convert to grassland + + [option] + image = "terrain/grass/green6.png" + message= "" + _ "Plant Farm" + "" + description = "" + _ "Cost: 0g" + "" + {ANL_SHOW_IF ("Peasant") "Re"} + [command] + {COMPLETE_ACTION 0} + {MODIFY_TERRAIN Gg $x1 $y1} + [sound] + name=dagger-swish.wav + [/sound] + [/command] + [/option] + + # ---------------------------------------------- + # GRASSLAND + + # Plant Farm + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Plant Farm" + "" + description = "" + _ "Cost: 0g" + "" + {ANL_SHOW_IF ("Peasant") "Gg,Gs"} + [command] + {COMPLETE_ACTION 0} + {MODIFY_TERRAIN Re $x1 $y1} + [sound] + name=entangle.wav + [/sound] + [/command] + [/option] + + # Build Village + + [option] + image = "terrain/village/human-tile.png" + message = "" + _ "Build Village" + "" + description = "" + _ "Cost: 15g" + "" + {ANL_SHOW_IF ("Peasant") "Gg,Gs"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=15 + [/variable] + + [then] + {COMPLETE_ACTION (-15)} + {MODIFY_TERRAIN "Gg^Vh" $x1 $y1} + {ANL_CAPTURE_VILLAGE} + {BUILD_SOUND_1} + [/then] + [/if] + [/command] + [/option] + + # Build Castle + + [option] + image = "terrain/castle/castle-tile.png" + message = "" + _ "Build Castle" + "" + description = "" + _ "Cost: 6g" + "" + {ANL_SHOW_IF ("Peasant") "Gg,Gs"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=6 + [/variable] + + [then] + {COMPLETE_ACTION (-6)} + {MODIFY_TERRAIN "Ch" $x1 $y1} + {BUILD_SOUND_2} + [/then] + [/if] + [/command] + [/option] + + # Flood + + [option] + image = "terrain/water/coast-tile.png" + message = "" + _ "Flood the Field" + "" + description = "" + _ "Cost: 4g" + "" + {ANL_SHOW_IF ("Peasant") "Gg,Gs"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=4 + [/variable] + + [then] + {COMPLETE_ACTION -4} + {MODIFY_TERRAIN "Ww" $x1 $y1} + [sound] + name=water-blast.wav + [/sound] + [/then] + [/if] + [/command] + [/option] + + # Plant Saplings + + [option] + image = "terrain/forest/pine-tile.png" + message = "" + _ "Plant Saplings" + "" + description = "" + _ "Cost: 1g" + "" + {ANL_SHOW_IF ("Peasant") "Gg,Gs"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=1 + [/variable] + + [then] + {COMPLETE_ACTION -1} + {MODIFY_TERRAIN "Gs^Fp" $x1 $y1} + [sound] + name=entangle.wav + [/sound] + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # FOREST + + # Chop Down Forest + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Chop Down Forest" + "" + description = "" + _ "Earns: 1g" + "" + {ANL_SHOW_IF ("Peasant") "Gs^Fp,Gs^Ft,Aa^Fpa,Gg^Fet"} + [command] + [set_variable] + name=finished + value=yes + [/set_variable] + + [set_variable] + name=unit.status.worked_this_turn + value=yes + [/set_variable] + [set_variable] + name=unit.moves + value=0 + [/set_variable] + + [gold] + side=$side_number + amount=1 + [/gold] + + [sound] + name=dagger-swish.wav + [/sound] + [delay] + time=250 + [/delay] + [sound] + name=axe.ogg + [/sound] + [delay] + time=150 + [/delay] + [sound] + name=wose-die.ogg + [/sound] + + {MODIFY_TERRAIN "Gg" $x1 $y1} + + [unstore_unit] + variable=unit + text=1 # wmllint: ignore + red,green,blue=204,204,51 + [/unstore_unit] + [/command] + [/option] + + # ---------------------------------------------- + # HILLS + + # Build Gold Mine + + [option] + image = "terrain/village/human-hills-tile.png" + message = "" + _ "Build Mine" + "" + description = "" + _ "Cost: 25g" + "" + {ANL_SHOW_IF ("Peasant") "Hh"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=25 + [/variable] + + [then] + {COMPLETE_ACTION (-25)} + {MODIFY_TERRAIN "Hh^Vhh" $x1 $y1} + {ANL_CAPTURE_VILLAGE} + {BUILD_SOUND_1} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # MOUNTAINS + + # Build Gold Mine + + [option] + image = "terrain/village/human-mountain-tile.png" + message = "" + _ "Build Mine" + "" + description = "" + _ "Cost: 25g" + "" + {ANL_SHOW_IF ("Peasant") "Mm"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=25 + [/variable] + + [then] + {COMPLETE_ACTION (-25)} + {MODIFY_TERRAIN "Mm^Vhh" $x1 $y1} + {ANL_CAPTURE_VILLAGE} + {BUILD_SOUND_1} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # WATER + + # Make a Ford + + [option] + image = "terrain/water/ford.png" + message = "" + _ "Make a Ford" + "" + description = "" + _ "Cost: 3g" + "" + {ANL_SHOW_IF ("Peasant") "Ww"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=3 + [/variable] + + [then] + {COMPLETE_ACTION (-3)} + [delay] + time=200 + [/delay] + [sound] + name=dagger-swish.wav + [/sound] + {MODIFY_TERRAIN "Wwf" $x1 $y1} + [/then] + [/if] + [/command] + [/option] + + # Landfill + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Landfill" + "" + description = "" + _ "Cost: 5g" + "" + {ANL_SHOW_IF ("Peasant") "Ww"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=5 + [/variable] + + [then] + {COMPLETE_ACTION (-5)} + [delay] + time=200 + [/delay] + [sound] + name=claws.ogg + [/sound] + {MODIFY_TERRAIN "Gg" $x1 $y1} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # FORD + + # Destroy the Ford + + [option] + image = "terrain/water/coast-tile.png" + message = "" + _ "Destroy the Ford" + "" + description = "" + _ "Cost: 0g" + "" + {ANL_SHOW_IF ("Peasant") "Wwf"} + [command] + {COMPLETE_ACTION 0} + [delay] + time=200 + [/delay] + {MODIFY_TERRAIN "Ww" $x1 $y1} + [sound] + name=pincers.ogg + [/sound] + [delay] + time=200 + [/delay] + [sound] + name=water-blast.wav + [/sound] + [/command] + [/option] + + # Landfill + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Landfill" + "" + description = "" + _ "Cost: 1g" + "" + {ANL_SHOW_IF ("Peasant") "Wwf"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=1 + [/variable] + + [then] + {COMPLETE_ACTION (-1)} + [delay] + time=200 + [/delay] + [sound] + name=claws.ogg + [/sound] + {MODIFY_TERRAIN "Gg" $x1 $y1} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # CAVE + + # Break Up Cave + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Smash Cave Floor" + "" + description = "" + _ "Cost: 2g" + "" + {ANL_SHOW_IF ("Peasant") "Uu,Uu^Ii"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=2 + [/variable] + + [then] + {COMPLETE_ACTION (-2)} + [sound] + name=claws.ogg + [/sound] + {MODIFY_TERRAIN "Gg" $x1 $y1} + [/then] + [/if] + [/command] + [/option] + + # Convert Cave To Hills + + [option] + image = "terrain/hills/regular2.png" + message = "" + _ "Smash Cave Floor" + "" + description = "" + _ "Cost: 3g" + "" + {ANL_SHOW_IF ("Peasant") "Uh,Uh^Ii"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=3 + [/variable] + + [then] + {COMPLETE_ACTION (-3)} + [sound] + name=claws.ogg + [/sound] + {MODIFY_TERRAIN "Hh" $x1 $y1} + [/then] + [/if] + [/command] + [/option] + + # Harvest Cave Mushrooms + + [option] + image = "terrain/cave/floor.png" + message = "" + _ "Harvest Mushrooms" + "" + description = "" + _ "Earns: 3g" + "" + {ANL_SHOW_IF ("Peasant") "Uu^Uf"} + [command] + [set_variable] + name=finished + value=yes + [/set_variable] + + [set_variable] + name=unit.status.worked_this_turn + value=yes + [/set_variable] + [set_variable] + name=unit.moves + value=0 + [/set_variable] + + [gold] + side=$side_number + amount=3 + [/gold] + + [sound] + name=dagger-swish.wav + [/sound] + [delay] + time=250 + [/delay] + [sound] + name=axe.ogg + [/sound] + + {MODIFY_TERRAIN "Uu" $x1 $y1} + + [unstore_unit] + variable=unit + text=3 # wmllint: ignore + red,green,blue=204,204,51 + [/unstore_unit] + [/command] + [/option] + + # ---------------------------------------------- + # CASTLE + + # Build Keep + + [option] + image = "terrain/castle/keep-tile.png" + message = "" + _ "Build a Keep" + "" + description = "" + _ "Cost: 6g" + "" + {ANL_SHOW_IF ("Peasant") "Ch,Ce,Cv,Cud,Chr,Chw,Chs"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=6 + [/variable] + + [then] + {COMPLETE_ACTION (-6)} + {MODIFY_TERRAIN "Kh" $x1 $y1} + {BUILD_SOUND_2} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # VILLAGE + + # Establish University + + [option] + image = "terrain/village/elven-tile.png" + message = "" + _ "Establish University" + "" + description = "" + _ "Cost: 7g" + "" + {ANL_SHOW_IF ("Peasant") "Gg^Vh,Aa^Vha"} + [command] + [if] + [variable] + name=worker.gold + greater_than_equal_to=7 + [/variable] + + [then] + {COMPLETE_ACTION (-7)} + {MODIFY_TERRAIN "Gg^Ve" $x1 $y1} + {ANL_CAPTURE_VILLAGE} + {BUILD_SOUND_2} + [/then] + [/if] + [/command] + [/option] + + # ---------------------------------------------- + # RUBBLE + + # Clear Rubble + + [option] + image = "terrain/grass/green6.png" + message = "" + _ "Clear the Ground" + "" + description = "" + _ "Cost: 0g" + "" + {ANL_SHOW_IF ("Peasant") "Rd"} + [command] + {COMPLETE_ACTION (-0)} + [delay] + time=200 + [/delay] + [sound] + name=claws.ogg + [/sound] + {MODIFY_TERRAIN "Gg" $x1 $y1} + [remove_item] + x,y=$x1,$y1 + [/remove_item] + [/command] + [/option] + [/message] + [/do] + [/while] + [/command] + [/set_menu_item] #enddef -# wmlindent: stop ignoring From 2346b3508f8d58b0581ad0485b63014094faea67 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 09:43:21 +1100 Subject: [PATCH 44/57] Simplify handling of HOTKEY_QUIT_TO_DESKTOP --- src/hotkey/command_executor.cpp | 12 +----------- src/hotkey/command_executor.hpp | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index b0d29a374555..8938bc4a8669 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -313,7 +313,7 @@ bool command_executor::execute_command(const hotkey_command& cmd, int /*index*/ map_screenshot(); break; case HOTKEY_QUIT_TO_DESKTOP: - quit_to_desktop(); + quit_confirmation::quit(); break; case HOTKEY_QUIT_GAME: quit_to_main_menu(); @@ -696,16 +696,6 @@ void command_executor_default::map_screenshot() { make_screenshot(_("Map-Screenshot"), get_video(), boost::bind(&display::screenshot, &get_display(), _1, true)); } -void command_executor_default::quit_to_desktop() -{ - if(quit_confirmation::default_promt()) { - throw CVideo::quit(); - } -} -void command_executor::quit_to_desktop() -{ - throw CVideo::quit(); -} void command_executor_default::quit_to_main_menu() { if(quit_confirmation::default_promt()) { diff --git a/src/hotkey/command_executor.hpp b/src/hotkey/command_executor.hpp index e728ed21b037..f22d3af6af78 100644 --- a/src/hotkey/command_executor.hpp +++ b/src/hotkey/command_executor.hpp @@ -113,7 +113,6 @@ class command_executor virtual void zoom_out() {} virtual void zoom_default() {} virtual void map_screenshot() {} - virtual void quit_to_desktop(); virtual void quit_to_main_menu() {} virtual void set_button_state() {} @@ -150,7 +149,6 @@ class command_executor_default : public command_executor void zoom_out(); void zoom_default(); void map_screenshot(); - void quit_to_desktop(); void quit_to_main_menu(); }; /* Functions to be called every time a event is intercepted. From b73cc5eb08f4a26f4e7284c1236fe4dc73bb2d22 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 09:44:33 +1100 Subject: [PATCH 45/57] Small formatting cleanup --- src/quit_confirmation.cpp | 3 ++- src/quit_confirmation.hpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/quit_confirmation.cpp b/src/quit_confirmation.cpp index b7744d624217..1d054afce529 100644 --- a/src/quit_confirmation.cpp +++ b/src/quit_confirmation.cpp @@ -41,5 +41,6 @@ void quit_confirmation::quit() bool quit_confirmation::default_promt() { - return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; + return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"), + gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; } diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index 5ee7367461cc..11aa044b5b07 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -31,7 +31,9 @@ class CVideo; class quit_confirmation { public: - quit_confirmation(const boost::function& promt = &quit_confirmation::default_promt) : promt_(promt) { blockers_.push_back(this); } + quit_confirmation(const boost::function& promt = &quit_confirmation::default_promt) + : promt_(promt) { blockers_.push_back(this); } + ~quit_confirmation() { blockers_.pop_back(); } /** From f067332d0ff5c78541f5cb31c4cdff47f83e61cb Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 23 Feb 2016 17:46:33 -0500 Subject: [PATCH 46/57] fix spelling --- src/gui/dialogs/synced_choice_wait.cpp | 2 +- src/hotkey/command_executor.cpp | 2 +- src/quit_confirmation.cpp | 4 ++-- src/quit_confirmation.hpp | 8 +++----- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index 53a16adef0eb..4285c556e8a6 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -99,7 +99,7 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name) void tsynced_choice_wait::on_btn_quit_game(CVideo&) { - if (quit_confirmation::default_promt()) { + if (quit_confirmation::default_prompt()) { throw_quit_game_exception(); } } diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index 8938bc4a8669..220149465719 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -698,7 +698,7 @@ void command_executor_default::map_screenshot() } void command_executor_default::quit_to_main_menu() { - if(quit_confirmation::default_promt()) { + if(quit_confirmation::default_prompt()) { throw_quit_game_exception(); } } diff --git a/src/quit_confirmation.cpp b/src/quit_confirmation.cpp index 1d054afce529..409d56bc9978 100644 --- a/src/quit_confirmation.cpp +++ b/src/quit_confirmation.cpp @@ -29,7 +29,7 @@ void quit_confirmation::quit() open_ = true; BOOST_REVERSE_FOREACH(quit_confirmation* blocker, blockers_) { - if(!blocker->promt_()) { + if(!blocker->prompt_()) { open_ = false; return; } @@ -39,7 +39,7 @@ void quit_confirmation::quit() throw CVideo::quit(); } -bool quit_confirmation::default_promt() +bool quit_confirmation::default_prompt() { return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"), gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index 11aa044b5b07..1c8c39fe9f6e 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -31,9 +31,7 @@ class CVideo; class quit_confirmation { public: - quit_confirmation(const boost::function& promt = &quit_confirmation::default_promt) - : promt_(promt) { blockers_.push_back(this); } - + quit_confirmation(const boost::function& prompt = &quit_confirmation::default_prompt) : prompt_(prompt) { blockers_.push_back(this); } ~quit_confirmation() { blockers_.pop_back(); } /** @@ -43,7 +41,7 @@ class quit_confirmation * displayed. */ static void quit(); - static bool default_promt(); + static bool default_prompt(); private: //noncopyable quit_confirmation( const quit_confirmation& ); @@ -51,7 +49,7 @@ class quit_confirmation static std::vector blockers_; static bool open_; - boost::function promt_; + boost::function prompt_; }; #endif From ed9ead2ac9e414efe52cab34f62fe2652cd88270 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 10:30:48 +1100 Subject: [PATCH 47/57] Add flag to quit_confirmation::quit() to only quit out of game --- src/gui/dialogs/synced_choice_wait.cpp | 13 ++----------- src/gui/dialogs/synced_choice_wait.hpp | 1 - src/hotkey/command_executor.cpp | 8 +------- src/hotkey/command_executor.hpp | 1 - src/quit_confirmation.cpp | 8 +++++++- src/quit_confirmation.hpp | 9 +++++++-- 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index 4285c556e8a6..b6add3016d24 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -76,10 +76,8 @@ void tsynced_choice_wait::pre_show(CVideo& video, twindow& window) tbutton& quit_button = find_widget( &window, "btn_quit_game", false); - connect_signal_mouse_left_click( - quit_button, - boost::bind(&tsynced_choice_wait::on_btn_quit_game, this, boost::ref(video)) - ); + connect_signal_mouse_left_click(quit_button, + boost::bind(&quit_confirmation::quit, false)); message_->set_label(mgr_.wait_message()); if(mgr_.finished() || !mgr_.waiting()) { @@ -97,11 +95,4 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name) } } -void tsynced_choice_wait::on_btn_quit_game(CVideo&) -{ - if (quit_confirmation::default_prompt()) { - throw_quit_game_exception(); - } -} - } diff --git a/src/gui/dialogs/synced_choice_wait.hpp b/src/gui/dialogs/synced_choice_wait.hpp index aa81510f1032..7c5fe4e2fa68 100644 --- a/src/gui/dialogs/synced_choice_wait.hpp +++ b/src/gui/dialogs/synced_choice_wait.hpp @@ -38,7 +38,6 @@ class tsynced_choice_wait : public tdialog, public events::observer void pre_show(CVideo& video, twindow& window); virtual void handle_generic_event(const std::string& event_name); - void on_btn_quit_game(CVideo& video); }; } diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index 220149465719..8bbf35cc5797 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -316,7 +316,7 @@ bool command_executor::execute_command(const hotkey_command& cmd, int /*index*/ quit_confirmation::quit(); break; case HOTKEY_QUIT_GAME: - quit_to_main_menu(); + quit_confirmation::quit(false); break; default: return false; @@ -696,10 +696,4 @@ void command_executor_default::map_screenshot() { make_screenshot(_("Map-Screenshot"), get_video(), boost::bind(&display::screenshot, &get_display(), _1, true)); } -void command_executor_default::quit_to_main_menu() -{ - if(quit_confirmation::default_prompt()) { - throw_quit_game_exception(); - } -} } diff --git a/src/hotkey/command_executor.hpp b/src/hotkey/command_executor.hpp index f22d3af6af78..2262b84ab331 100644 --- a/src/hotkey/command_executor.hpp +++ b/src/hotkey/command_executor.hpp @@ -113,7 +113,6 @@ class command_executor virtual void zoom_out() {} virtual void zoom_default() {} virtual void map_screenshot() {} - virtual void quit_to_main_menu() {} virtual void set_button_state() {} virtual void recalculate_minimap() {} diff --git a/src/quit_confirmation.cpp b/src/quit_confirmation.cpp index 409d56bc9978..8e25ad50aad6 100644 --- a/src/quit_confirmation.cpp +++ b/src/quit_confirmation.cpp @@ -13,6 +13,7 @@ */ #include "quit_confirmation.hpp" +#include "game_end_exceptions.hpp" #include "gettext.hpp" #include "video.hpp" #include "gui/dialogs/message.hpp" @@ -22,7 +23,7 @@ std::vector quit_confirmation::blockers_ = std::vector(); bool quit_confirmation::open_ = false; -void quit_confirmation::quit() +void quit_confirmation::quit(const bool full_exit) { if(!open_) { @@ -36,6 +37,11 @@ void quit_confirmation::quit() } open_ = false; } + + if(!full_exit) { + throw_quit_game_exception(); + } + throw CVideo::quit(); } diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index 1c8c39fe9f6e..bfb79633fbb1 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -31,17 +31,22 @@ class CVideo; class quit_confirmation { public: - quit_confirmation(const boost::function& prompt = &quit_confirmation::default_prompt) : prompt_(prompt) { blockers_.push_back(this); } + quit_confirmation(const boost::function& promt = &quit_confirmation::default_prompt) + : prompt_(promt) { blockers_.push_back(this); } + ~quit_confirmation() { blockers_.pop_back(); } /** * Shows the quit confirmation if needed. * + * @param full_exit Whether to quit fully to the desktop or simply + * exit game. Defaults to true. * @throws CVideo::quit If the user chooses to quit or no prompt was * displayed. */ - static void quit(); + static void quit(const bool full_exit = true); static bool default_prompt(); + private: //noncopyable quit_confirmation( const quit_confirmation& ); From 27d4091ec5bf510a9f3a1dd2a50d46ac229cfb8c Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 10:35:26 +1100 Subject: [PATCH 48/57] Reapplied a fix from f067332d0ff5 that got lost in ed9ead2ac9e4 --- src/quit_confirmation.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index bfb79633fbb1..a15d716daa5b 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -31,8 +31,8 @@ class CVideo; class quit_confirmation { public: - quit_confirmation(const boost::function& promt = &quit_confirmation::default_prompt) - : prompt_(promt) { blockers_.push_back(this); } + quit_confirmation(const boost::function& prompt = &quit_confirmation::default_prompt) + : prompt_(prompt) { blockers_.push_back(this); } ~quit_confirmation() { blockers_.pop_back(); } From 7d0a02ec7d1af805e175f58d4adcbf3faef1b8ed Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 12:28:38 +1100 Subject: [PATCH 49/57] Bunch of refactoring of editor quit handling --- src/editor/controller/editor_controller.cpp | 11 ++++---- src/events.cpp | 4 +-- src/gui/dialogs/synced_choice_wait.cpp | 2 +- src/hotkey/command_executor.cpp | 4 +-- src/quit_confirmation.cpp | 30 ++++++++++++++------- src/quit_confirmation.hpp | 8 +++--- src/wesnoth.cpp | 5 +--- 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/src/editor/controller/editor_controller.cpp b/src/editor/controller/editor_controller.cpp index 22e8fc10262a..a1c0e6a082f7 100644 --- a/src/editor/controller/editor_controller.cpp +++ b/src/editor/controller/editor_controller.cpp @@ -49,6 +49,8 @@ #include "../../unit.hpp" #include "../../unit_animation_component.hpp" +#include "quit_confirmation.hpp" + #include "halo.hpp" #include @@ -214,7 +216,7 @@ bool editor_controller::quit_confirm() message = _("Do you really want to quit? The following maps were modified and all changes since the last save will be lost:"); message += modified; } - return gui2::show_message(gui().video(), _("Quit"), message, gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; + return quit_confirmation::show_prompt(message); } void editor_controller::custom_tods_dialog() @@ -717,16 +719,13 @@ bool editor_controller::execute_command(const hotkey::hotkey_command& cmd, int i return true; case HOTKEY_QUIT_GAME: - if(quit_confirm()) { + if(quit_confirmation::quit()) { do_quit_ = true; quit_mode_ = EXIT_NORMAL; } return true; case HOTKEY_QUIT_TO_DESKTOP: - if(quit_confirm()) { - do_quit_ = true; - quit_mode_ = EXIT_QUIT_TO_DESKTOP; - } + quit_confirmation::quit_to_desktop(); return true; case TITLE_SCREEN__RELOAD_WML: context_manager_->save_all_maps(true); diff --git a/src/events.cpp b/src/events.cpp index ba167d55510d..cfa3124d107b 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -499,7 +499,7 @@ void pump() #ifndef __APPLE__ case SDL_KEYDOWN: { if(event.key.keysym.sym == SDLK_F4 && (event.key.keysym.mod == KMOD_RALT || event.key.keysym.mod == KMOD_LALT)) { - quit_confirmation::quit(); + quit_confirmation::quit_to_desktop(); continue; // this event is already handled } break; @@ -522,7 +522,7 @@ void pump() #endif case SDL_QUIT: { - quit_confirmation::quit(); + quit_confirmation::quit_to_desktop(); continue; //this event is already handled. } } diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index b6add3016d24..716892f0f719 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -77,7 +77,7 @@ void tsynced_choice_wait::pre_show(CVideo& video, twindow& window) &window, "btn_quit_game", false); connect_signal_mouse_left_click(quit_button, - boost::bind(&quit_confirmation::quit, false)); + boost::bind(&quit_confirmation::quit_to_title)); message_->set_label(mgr_.wait_message()); if(mgr_.finished() || !mgr_.waiting()) { diff --git a/src/hotkey/command_executor.cpp b/src/hotkey/command_executor.cpp index 8bbf35cc5797..ccb27d65d999 100644 --- a/src/hotkey/command_executor.cpp +++ b/src/hotkey/command_executor.cpp @@ -313,10 +313,10 @@ bool command_executor::execute_command(const hotkey_command& cmd, int /*index*/ map_screenshot(); break; case HOTKEY_QUIT_TO_DESKTOP: - quit_confirmation::quit(); + quit_confirmation::quit_to_desktop(); break; case HOTKEY_QUIT_GAME: - quit_confirmation::quit(false); + quit_confirmation::quit_to_title(); break; default: return false; diff --git a/src/quit_confirmation.cpp b/src/quit_confirmation.cpp index 8e25ad50aad6..c930e4b9f844 100644 --- a/src/quit_confirmation.cpp +++ b/src/quit_confirmation.cpp @@ -23,30 +23,40 @@ std::vector quit_confirmation::blockers_ = std::vector(); bool quit_confirmation::open_ = false; -void quit_confirmation::quit(const bool full_exit) +bool quit_confirmation::quit() { - if(!open_) - { + if(!open_) { open_ = true; BOOST_REVERSE_FOREACH(quit_confirmation* blocker, blockers_) { if(!blocker->prompt_()) { open_ = false; - return; + return false; } } open_ = false; } - if(!full_exit) { - throw_quit_game_exception(); - } + return true; +} - throw CVideo::quit(); +void quit_confirmation::quit_to_title() +{ + if(quit()) { throw_quit_game_exception(); } } -bool quit_confirmation::default_prompt() +void quit_confirmation::quit_to_desktop() { - return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"), + if(quit()) { throw CVideo::quit(); } +} + +bool quit_confirmation::show_prompt(const std::string& message) +{ + return gui2::show_message(CVideo::get_singleton(), _("Quit"), message, gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL; } + +bool quit_confirmation::default_prompt() +{ + return show_prompt(_("Do you really want to quit?")); +} diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index a15d716daa5b..3b6ec7cef1cd 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -39,12 +39,14 @@ class quit_confirmation /** * Shows the quit confirmation if needed. * - * @param full_exit Whether to quit fully to the desktop or simply - * exit game. Defaults to true. * @throws CVideo::quit If the user chooses to quit or no prompt was * displayed. */ - static void quit(const bool full_exit = true); + static bool quit(); + static void quit_to_title(); + static void quit_to_desktop(); + + static bool show_prompt(const std::string& message); static bool default_prompt(); private: diff --git a/src/wesnoth.cpp b/src/wesnoth.cpp index eeb8ca6f8e89..8b9c3786c069 100644 --- a/src/wesnoth.cpp +++ b/src/wesnoth.cpp @@ -861,10 +861,7 @@ static int do_gameloop(const std::vector& args) image::flush_cache(); continue; } else if(res == gui2::ttitle_screen::START_MAP_EDITOR) { - ///@todo editor can ask the game to quit completely - if (game->start_editor() == editor::EXIT_QUIT_TO_DESKTOP) { - return 0; - } + game->start_editor(); continue; } game->launch_game(should_reload); From 03ed7ffdff24f5b9cfe7327b3b5b389c18cbb3dd Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 12:33:59 +1100 Subject: [PATCH 50/57] Applied some formatting to Editor quit confirmation-with-maps-open message --- src/editor/controller/editor_controller.cpp | 2 +- src/editor/map/context_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/controller/editor_controller.cpp b/src/editor/controller/editor_controller.cpp index a1c0e6a082f7..badcae6b3353 100644 --- a/src/editor/controller/editor_controller.cpp +++ b/src/editor/controller/editor_controller.cpp @@ -214,7 +214,7 @@ bool editor_controller::quit_confirm() message = _("Do you really want to quit? Changes in the map since the last save will be lost."); } else { message = _("Do you really want to quit? The following maps were modified and all changes since the last save will be lost:"); - message += modified; + message += "\n" + modified; } return quit_confirmation::show_prompt(message); } diff --git a/src/editor/map/context_manager.cpp b/src/editor/map/context_manager.cpp index 337ddca70580..140aa11a602c 100644 --- a/src/editor/map/context_manager.cpp +++ b/src/editor/map/context_manager.cpp @@ -130,7 +130,7 @@ size_t context_manager::modified_maps(std::string& message) { } } BOOST_FOREACH(std::string& str, modified) { - message += "\n" + str; + message += "\n" + std::string("• ") + str; } return modified.size(); } From 031628dac5bfe95976e599735c2cd725e5ea095d Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 12:37:31 +1100 Subject: [PATCH 51/57] Small Editor quit confirmation message wording change --- src/editor/controller/editor_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/controller/editor_controller.cpp b/src/editor/controller/editor_controller.cpp index badcae6b3353..277a67602d3d 100644 --- a/src/editor/controller/editor_controller.cpp +++ b/src/editor/controller/editor_controller.cpp @@ -211,7 +211,7 @@ bool editor_controller::quit_confirm() if (amount == 0) { message = _("Do you really want to quit?"); } else if (amount == 1) { - message = _("Do you really want to quit? Changes in the map since the last save will be lost."); + message = _("Do you really want to quit? Changes to this map since the last save will be lost."); } else { message = _("Do you really want to quit? The following maps were modified and all changes since the last save will be lost:"); message += "\n" + modified; From 7d2eaef38d4fed1f10bdb2aad01ed2163f794270 Mon Sep 17 00:00:00 2001 From: sigurdfdragon Date: Tue, 23 Feb 2016 23:52:02 -0500 Subject: [PATCH 52/57] AOI: Make the named loyal units unnameable. --- .../An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg | 1 + data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/data/campaigns/An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg b/data/campaigns/An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg index 8c11f7742600..640a4967bd16 100644 --- a/data/campaigns/An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg +++ b/data/campaigns/An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg @@ -68,6 +68,7 @@ id=Lomarfel name= _ "Lomarfel" profile=portraits/lomarfel.png + unrenamable=yes x,y=15,18 [modifications] {TRAIT_LOYAL} diff --git a/data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg b/data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg index 9beac1cecdcb..004896bfecad 100644 --- a/data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg +++ b/data/campaigns/An_Orcish_Incursion/scenarios/07_Showdown.cfg @@ -119,6 +119,7 @@ id=Lomarfel name= _ "Lomarfel" profile=portraits/lomarfel.png + unrenamable=yes x,y=16,18 [modifications] {TRAIT_LOYAL} @@ -139,6 +140,7 @@ id=Celodith name= _ "Celodith" gender=female + unrenamable=yes x,y=17,18 side=1 [modifications] @@ -159,6 +161,7 @@ id=Earanduil name= _ "Earanduil" gender=male + unrenamable=yes x,y=17,19 side=1 [modifications] @@ -179,6 +182,7 @@ id=Elvyniel name= _ "Elvyniel" gender=female + unrenamable=yes x,y=18,18 side=1 [modifications] @@ -199,6 +203,7 @@ id=Delorfilith name= _ "Delorfilith" gender=male + unrenamable=yes x,y=18,19 side=1 [modifications] From a87939acb02df8f6e3fa2ba626449a3574930963 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 16:27:08 +1100 Subject: [PATCH 53/57] Run wmlindent --- .../scenarios/2p_Dark_Forecast.cfg | 20 +++++++++---------- .../scenarios/Random_Scenario_Lua_Cave.cfg | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/multiplayer/scenarios/2p_Dark_Forecast.cfg b/data/multiplayer/scenarios/2p_Dark_Forecast.cfg index 0ae556ef36f4..0d5ba56cab79 100644 --- a/data/multiplayer/scenarios/2p_Dark_Forecast.cfg +++ b/data/multiplayer/scenarios/2p_Dark_Forecast.cfg @@ -22,7 +22,7 @@ Note: You need to use the default map settings for the scenario to work right." no_leader=yes controller="ai" village_gold=1 - defeat_condition=never + defeat_condition=never [/side] [side] @@ -78,7 +78,7 @@ Note: You need to use the default map settings for the scenario to work right." share_view="yes" [/side] [lua] - code = << + code = << wesnoth.dofile("multiplayer/scenarios/2p_Dark_Forecast.lua") >> [/lua] @@ -234,15 +234,15 @@ The weather will also change randomly, affecting the layout of the map. message= _ "The enemy cheers as a dark mist rises from the land, engulfing you. As ghostly wisps drain away your will, you realize that your time in this land is over." [/message] [/event] - [options] + [options] [slider] id = "enemey_gold_factor" - default = 0 - min = -30 - max = 30 - step = 10 - name = "Difficulty" - description = "Changes the gold worth of the enemy spawns by a certain perentage" + default = 0 + min = -30 + max = 30 + step = 10 + name = "Difficulty" + description = "Changes the gold worth of the enemy spawns by a certain perentage" [/slider] - [/options] + [/options] [/multiplayer] diff --git a/data/multiplayer/scenarios/Random_Scenario_Lua_Cave.cfg b/data/multiplayer/scenarios/Random_Scenario_Lua_Cave.cfg index 51357b441b74..3ea90b808885 100644 --- a/data/multiplayer/scenarios/Random_Scenario_Lua_Cave.cfg +++ b/data/multiplayer/scenarios/Random_Scenario_Lua_Cave.cfg @@ -11,4 +11,4 @@ [/generator] {DEFAULT_SCHEDULE} [/multiplayer] -#endif \ No newline at end of file +#endif From 1ff15d3ff1680ca55e71741fde95b379fbf3eb25 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 16:31:01 +1100 Subject: [PATCH 54/57] Ran wmlindent on campaigns --- data/campaigns/An_Orcish_Incursion/_main.cfg | 2 +- .../scenarios/05_Linaera_the_Quick.cfg | 2 +- .../scenarios/13_The_Drowned_Plains.cfg | 70 ++++---- .../scenarios/07_Crossroads.cfg | 158 +++++++++--------- .../scenarios/chapter1/01_The_Uprooting.cfg | 4 +- .../chapter1/02_Hostile_Mountains.cfg | 10 +- .../chapter1/03_Kalian_under_Attack.cfg | 12 +- .../chapter2/04_The_Elvish_Treasury.cfg | 12 +- .../chapter2/05_The_Saurian_Treasury.cfg | 6 +- .../chapter2/06_Acquaintance_in_Need.cfg | 4 +- .../chapter2/07_Elves_Last_Stand.cfg | 22 ++- .../chapter2/08_Council_of_Hard_Choices.cfg | 12 +- .../scenarios/chapter3/09_Bounty_Hunters.cfg | 18 +- .../chapter3/10_Cliffs_of_Thoria.cfg | 18 +- .../chapter3/11_Battle_of_the_Book.cfg | 20 +-- .../chapter4/13_News_from_the_Front.cfg | 14 +- .../scenarios/chapter4/14_Human_Alliance.cfg | 20 +-- .../chapter4/17_Breaking_the_Siege.cfg | 6 +- .../scenarios/chapter5/19_Costly_Revenge.cfg | 2 +- .../Legend_of_Wesmere/utils/characters.cfg | 2 +- .../Legend_of_Wesmere/utils/low-macros.cfg | 36 ++-- .../scenarios/12_The_Final_Confrontation.cfg | 2 +- 22 files changed, 225 insertions(+), 227 deletions(-) diff --git a/data/campaigns/An_Orcish_Incursion/_main.cfg b/data/campaigns/An_Orcish_Incursion/_main.cfg index fcdf1d926873..6ab86535acec 100644 --- a/data/campaigns/An_Orcish_Incursion/_main.cfg +++ b/data/campaigns/An_Orcish_Incursion/_main.cfg @@ -20,7 +20,7 @@ {CAMPAIGN_DIFFICULTY EASY "units/elves-wood/fighter.png~RC(magenta>red)" ( _ "Fighter") ( _ "Beginner")} {CAMPAIGN_DIFFICULTY NORMAL "units/elves-wood/lord.png~RC(magenta>red)" ( _ "Lord") ( _ "Normal")} {DEFAULT_DIFFICULTY} {CAMPAIGN_DIFFICULTY HARD "units/elves-wood/high-lord.png~RC(magenta>red)" ( _ "High Lord") ( _ "Challenging")} - + # Geographical and historical assumptions (ESR): # # As originally written by Josh Parsons, this campaign was not set in diff --git a/data/campaigns/An_Orcish_Incursion/scenarios/05_Linaera_the_Quick.cfg b/data/campaigns/An_Orcish_Incursion/scenarios/05_Linaera_the_Quick.cfg index 2c3aef5c0d76..17697f11bf3d 100644 --- a/data/campaigns/An_Orcish_Incursion/scenarios/05_Linaera_the_Quick.cfg +++ b/data/campaigns/An_Orcish_Incursion/scenarios/05_Linaera_the_Quick.cfg @@ -85,7 +85,7 @@ [side] side=3 controller=ai - hidden=yes + hidden=yes team_name=Mages user_team_name= _ "Mages" # Use stock flags diff --git a/data/campaigns/Eastern_Invasion/scenarios/13_The_Drowned_Plains.cfg b/data/campaigns/Eastern_Invasion/scenarios/13_The_Drowned_Plains.cfg index dd819741d65d..ebf14c7bb0ff 100644 --- a/data/campaigns/Eastern_Invasion/scenarios/13_The_Drowned_Plains.cfg +++ b/data/campaigns/Eastern_Invasion/scenarios/13_The_Drowned_Plains.cfg @@ -241,41 +241,41 @@ [/filter_location] [command] {VARIABLE random_ambusher_type_i ("$(($random_ambusher_type_i + 1) % $random_ambusher_type_table.length)")} - [unit] - x,y=$ambush_location.x,$ambush_location.y - type=$random_ambusher_type_table[$random_ambusher_type_i].type - side={SIDE} - role=ambusher - random_traits=yes - upkeep=loyal - [/unit] - - [object] - silent=yes - - [filter] - x,y=$ambush_location.x,$ambush_location.y - [/filter] - - [effect] - apply_to=new_ability - - [abilities] - [hides] - id=undead_ambush - affect_self=yes - - [filter_self] - role=ambusher - - [filter_location] - terrain=Ss - [/filter_location] - [/filter_self] - [/hides] - [/abilities] - [/effect] - [/object] + [unit] + x,y=$ambush_location.x,$ambush_location.y + type=$random_ambusher_type_table[$random_ambusher_type_i].type + side={SIDE} + role=ambusher + random_traits=yes + upkeep=loyal + [/unit] + + [object] + silent=yes + + [filter] + x,y=$ambush_location.x,$ambush_location.y + [/filter] + + [effect] + apply_to=new_ability + + [abilities] + [hides] + id=undead_ambush + affect_self=yes + + [filter_self] + role=ambusher + + [filter_location] + terrain=Ss + [/filter_location] + [/filter_self] + [/hides] + [/abilities] + [/effect] + [/object] [/command] [/random_placement] #enddef diff --git a/data/campaigns/Heir_To_The_Throne/scenarios/07_Crossroads.cfg b/data/campaigns/Heir_To_The_Throne/scenarios/07_Crossroads.cfg index 25002d2266f4..bf69ac169c47 100644 --- a/data/campaigns/Heir_To_The_Throne/scenarios/07_Crossroads.cfg +++ b/data/campaigns/Heir_To_The_Throne/scenarios/07_Crossroads.cfg @@ -284,86 +284,86 @@ #define ORC_AMBUSH_AREA SIDE X_SPAN Y_SPAN NUMBER # Any hill that's completely surrounded by other hills, mountains or # forest is eligible as an ambush location. - [random_placement] + [random_placement] variable=ambush_location - num_items={NUMBER} - [filter_location] - x={X_SPAN} - y={Y_SPAN} - terrain=Hh - - [not] - [filter_adjacent_location] - [not] - terrain=Hh*,Mm*,*^F* - [/not] - [/filter_adjacent_location] - [/not] - [/filter_location] - [command] - [if] - [variable] - name=random_ambusher_type_i - less_than=4 - [/variable] - - [then] - {VARIABLE_OP random_ambusher_type_i add 1} - [/then] - - [else] - {VARIABLE random_ambusher_type_i 0} - [/else] - [/if] - - # And here we place an ambusher of a type specified by the - # random_ambusher_type_table and random_ambusher_type_i - # variables, thus always having the same ratio of different - # types. - - [unit] - x,y=$ambush_location.x,$ambush_location.y - type=$random_ambusher_type_table[$random_ambusher_type_i].type - side={SIDE} - facing=sw - role=ambusher - random_traits=yes - - [modifications] - {TRAIT_LOYAL} - [/modifications] - {IS_LOYAL} - [/unit] - - [object] - silent=yes - - [filter] - x,y=$ambush_location.x,$ambush_location.y - [/filter] - - [effect] - apply_to=new_ability - - [abilities] - [hides] - id=orc_ambush - affect_self=yes - - [filter_self] - role=ambusher - - [filter_location] - terrain=Hh,Mm - [/filter_location] - [/filter_self] - [/hides] - [/abilities] - [/effect] - [/object] - [/command] - [/random_placement] - + num_items={NUMBER} + [filter_location] + x={X_SPAN} + y={Y_SPAN} + terrain=Hh + + [not] + [filter_adjacent_location] + [not] + terrain=Hh*,Mm*,*^F* + [/not] + [/filter_adjacent_location] + [/not] + [/filter_location] + [command] + [if] + [variable] + name=random_ambusher_type_i + less_than=4 + [/variable] + + [then] + {VARIABLE_OP random_ambusher_type_i add 1} + [/then] + + [else] + {VARIABLE random_ambusher_type_i 0} + [/else] + [/if] + + # And here we place an ambusher of a type specified by the + # random_ambusher_type_table and random_ambusher_type_i + # variables, thus always having the same ratio of different + # types. + + [unit] + x,y=$ambush_location.x,$ambush_location.y + type=$random_ambusher_type_table[$random_ambusher_type_i].type + side={SIDE} + facing=sw + role=ambusher + random_traits=yes + + [modifications] + {TRAIT_LOYAL} + [/modifications] + {IS_LOYAL} + [/unit] + + [object] + silent=yes + + [filter] + x,y=$ambush_location.x,$ambush_location.y + [/filter] + + [effect] + apply_to=new_ability + + [abilities] + [hides] + id=orc_ambush + affect_self=yes + + [filter_self] + role=ambusher + + [filter_location] + terrain=Hh,Mm + [/filter_location] + [/filter_self] + [/hides] + [/abilities] + [/effect] + [/object] + [/command] + [/random_placement] + #enddef # Only the number of ambushers differs by difficulty here. diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg index a603fc805fca..97346a382a11 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/01_The_Uprooting.cfg @@ -143,7 +143,7 @@ This is the story of Kalenz, Landar, and of the Elves in the first days of the h #### /Kalenz side #### #### Landar's side #### - {MP_SIDE 2 ( + {MP_SIDE 2 ( save_id=Landar {PLAYABLE} {LANDAR} @@ -163,7 +163,7 @@ This is the story of Kalenz, Landar, and of the Elves in the first days of the h x=19 y=16 [/unit] - )} + )} #### Landar's side #### [side] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/02_Hostile_Mountains.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/02_Hostile_Mountains.cfg index d080b39d7d95..16cfd9ff6a61 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/02_Hostile_Mountains.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/02_Hostile_Mountains.cfg @@ -84,7 +84,7 @@ {PLAYER_GOLD} fog=no extra_recruit=Elvish Fighter, Elvish Archer - )} + )} ### Olurf's Code ### #define OLURFS_LAND @@ -604,9 +604,9 @@ [endlevel] result=victory #ifdef MULTIPLAYER - bonus=0.5 + bonus=0.5 #else - bonus=yes + bonus=yes #endif [/endlevel] [/event] @@ -646,9 +646,9 @@ [endlevel] result=victory #ifdef MULTIPLAYER - bonus=0.5 + bonus=0.5 #else - bonus=yes + bonus=yes #endif [/endlevel] [/event] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg index 631dc2a51e63..a7fd82bb1c73 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg @@ -97,8 +97,8 @@ save_id=Landar fog=yes share_view=yes - {PLAYER_GOLD} - )} + {PLAYER_GOLD} + )} [side] side=3 @@ -154,8 +154,8 @@ {MP_SIDE 4 ( no_leader=yes - previous_save_id=Landar - {PLAYABLE} + previous_save_id=Landar + {PLAYABLE} save_id=El_Isomithir fog=yes share_view=yes @@ -178,7 +178,7 @@ [/modifications] {IS_LOYAL} [/unit] - )} + )} [side] side=5 @@ -1178,7 +1178,7 @@ {GLOBAL_VARIABLE LoW_Chapter_One gold_store el_isomithir_gold global} #endif [/event] - {DEFAULT_VICTORY 0.5} + {DEFAULT_VICTORY 0.5} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/04_The_Elvish_Treasury.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/04_The_Elvish_Treasury.cfg index 89e5c0ab1149..f22482cd0703 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/04_The_Elvish_Treasury.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/04_The_Elvish_Treasury.cfg @@ -90,7 +90,7 @@ Chapter Two" {PLAYABLE} {PLAYER_GOLD} extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout - )} + )} {MP_SIDE 3 ( no_leader=yes @@ -233,10 +233,10 @@ Chapter Two" [/recall] #ifdef MULTIPLAYER - # TODO: this is the only unit that player3 controls until - # Cleodil is freed by the other players. We should make this - # scenario more intesting for player 3 during this time. - # Maybe give him some units that managed to escape and want to help? + # TODO: this is the only unit that player3 controls until + # Cleodil is freed by the other players. We should make this + # scenario more intesting for player 3 during this time. + # Maybe give him some units that managed to escape and want to help? {UNIT 3 (Elvish Ranger) 23 24 (role=liberator)} #endif [allow_extra_recruit] @@ -418,7 +418,7 @@ Chapter Two" message= _ "When you meet your kin in the dry hells, tell them you perished at the hands of Kalenz’s elves!" [/message] [/event] - {DEFAULT_VICTORY 0.4} + {DEFAULT_VICTORY 0.4} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/05_The_Saurian_Treasury.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/05_The_Saurian_Treasury.cfg index 5d04829c097c..827d63ddf0d4 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/05_The_Saurian_Treasury.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/05_The_Saurian_Treasury.cfg @@ -102,7 +102,7 @@ x=4 y=11 [/unit] - )} + )} {MP_SIDE 3 ( no_leader=yes @@ -116,7 +116,7 @@ x=1 y=15 [/unit] - )} + )} #define SAURIAN_AI {ai/aliases/stable_singleplayer.cfg} @@ -521,7 +521,7 @@ #endif [/event] - {DEFAULT_VICTORY 0.4} + {DEFAULT_VICTORY 0.4} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/06_Acquaintance_in_Need.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/06_Acquaintance_in_Need.cfg index 8e893c6022ff..baacf365f71b 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/06_Acquaintance_in_Need.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/06_Acquaintance_in_Need.cfg @@ -75,7 +75,7 @@ name=prestart {RECALL_LOYALS} [/event] - + {MP_SIDE 2 ( {PLAYABLE} save_id=Landar @@ -363,7 +363,7 @@ [/sound] [/event] - {DEFAULT_VICTORY 0.4} + {DEFAULT_VICTORY 0.4} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg index dacc93fdf214..25c54d69548c 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg @@ -106,7 +106,6 @@ {RECALL_LOYALS} [/event] - {MP_SIDE 2 ( no_leader=yes {PLAYABLE} @@ -122,7 +121,7 @@ x=45 y=35 [/unit] - )} + )} {MP_SIDE 3 ( no_leader=yes @@ -139,8 +138,7 @@ x=47 y=28 [/unit] - - )} + )} ### Allies #### [side] @@ -152,7 +150,7 @@ {GOLD 400 300 200} #else {GOLD 133 100 65} - previous_save_id=Kalenz + previous_save_id=Kalenz #endif [unit] @@ -185,22 +183,22 @@ {MP_SIDE 5 ( {PLAYABLE} {EL_ISOMITHIR} - save_id=El_Isomithir - previous_save_id=Landar + save_id=El_Isomithir + previous_save_id=Landar x=29 y=32 {GOLD 133 100 65} - )} + )} {MP_SIDE 6 ( {PLAYABLE} {ERADION} - save_id=Eradion - previous_save_id=Cleodil + save_id=Eradion + previous_save_id=Cleodil x=7 y=36 {GOLD 133 100 65} - )} + )} [event] name=prestart @@ -684,7 +682,7 @@ [/message] [/event] - {DEFAULT_VICTORY 0.4} + {DEFAULT_VICTORY 0.4} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} ###/DEATH EVENTS### [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/08_Council_of_Hard_Choices.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/08_Council_of_Hard_Choices.cfg index 90394c59610e..f67cb3a75223 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/08_Council_of_Hard_Choices.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter2/08_Council_of_Hard_Choices.cfg @@ -16,12 +16,12 @@ [side] no_leader=yes - # The mp connect code doesn't like scenarios without human sides - controller=human - allow_player=yes - previous_save_id=Kalenz - save_id=temp1234 - persistent=no + # The mp connect code doesn't like scenarios without human sides + controller=human + allow_player=yes + previous_save_id=Kalenz + save_id=temp1234 + persistent=no [unit] {KALENZ} [/unit] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg index 4f1846d254dd..c4864d6d7c85 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg @@ -87,7 +87,7 @@ Chapter Three" [/side] #Landar's side - {MP_SIDE 2 ( + {MP_SIDE 2 ( {PLAYABLE} save_id=Landar fog=no @@ -95,10 +95,10 @@ Chapter Three" {MULTIPLAYER_GOLD} no_leader=yes extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout - )} + )} #Olurf's side - {MP_SIDE 3 ( + {MP_SIDE 3 ( {PLAYABLE} save_id=Olurf fog=no @@ -108,10 +108,10 @@ Chapter Three" no_leader=yes {DWARF_SETUP} extra_recruit=Dwarvish Fighter, Dwarvish Scout, Dwarvish Guardsman, Dwarvish Thunderer - )} + )} #Cleodil's side - {MP_SIDE 4 ( + {MP_SIDE 4 ( {PLAYABLE} save_id=Cleodil fog=no @@ -119,7 +119,7 @@ Chapter Three" {MULTIPLAYER_GOLD} no_leader=yes recruit=Elvish Shaman, Wose, Elvish Scout - )} + )} [side] side=5 @@ -545,9 +545,9 @@ Chapter Three" [endlevel] result=victory #ifdef MULTIPLAYER - bonus=0.3 + bonus=0.3 #else - bonus=yes + bonus=yes #endif [/endlevel] [/event] @@ -665,7 +665,7 @@ Chapter Three" #endif [/event] - {DEFAULT_VICTORY 0.3} + {DEFAULT_VICTORY 0.3} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/10_Cliffs_of_Thoria.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/10_Cliffs_of_Thoria.cfg index b4d3d12a9795..3de16fe79ddb 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/10_Cliffs_of_Thoria.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/10_Cliffs_of_Thoria.cfg @@ -74,8 +74,8 @@ #endif [/side] - {MP_SIDE 2 ( - no_leader=yes + {MP_SIDE 2 ( + no_leader=yes {MULTIPLAYER_GOLD} {PLAYABLE} save_id=Landar @@ -83,9 +83,9 @@ {LANDAR} extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout [/unit] - )} + )} - {MP_SIDE 3 ( + {MP_SIDE 3 ( no_leader=yes {MULTIPLAYER_GOLD} {PLAYABLE} @@ -94,9 +94,9 @@ {OLURF} extra_recruit=Dwarvish Fighter, Dwarvish Scout, Dwarvish Guardsman, Dwarvish Thunderer [/unit] - )} + )} - {MP_SIDE 4 ( + {MP_SIDE 4 ( no_leader=yes {MULTIPLAYER_GOLD} {PLAYABLE} @@ -280,9 +280,9 @@ [endlevel] result=victory #ifdef MULTIPLAYER - bonus=0.3 + bonus=0.3 #else - bonus=yes + bonus=yes #endif [/endlevel] [/event] @@ -394,7 +394,7 @@ {UNCLEAR_FOG} [/event] - {DEFAULT_VICTORY 0.3} + {DEFAULT_VICTORY 0.3} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/11_Battle_of_the_Book.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/11_Battle_of_the_Book.cfg index 28613ec05a7c..fc52cd0ff76f 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/11_Battle_of_the_Book.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter3/11_Battle_of_the_Book.cfg @@ -77,7 +77,7 @@ #endif [/side] - {MP_SIDE 2 ( + {MP_SIDE 2 ( {PLAYABLE} save_id=Landar fog=yes @@ -87,9 +87,9 @@ {LANDAR} extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout [/unit] - )} + )} - {MP_SIDE 3 ( + {MP_SIDE 3 ( {PLAYABLE} save_id=Olurf fog=yes @@ -99,19 +99,19 @@ {OLURF} extra_recruit=Dwarvish Scout, Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Guardsman [/unit] - )} + )} - {MP_SIDE 4 ( + {MP_SIDE 4 ( {PLAYABLE} save_id=Cleodil fog=yes share_view=yes no_leader=yes - [unit] + [unit] {CLEODIL} extra_recruit=Elvish Shaman, Wose, Elvish Scout [/unit] - )} + )} [side] side=5 @@ -288,9 +288,9 @@ result=victory save=no #ifdef MULTIPLAYER - bonus=0.3 + bonus=0.3 #else - bonus=yes + bonus=yes #endif [/endlevel] [/event] @@ -309,7 +309,7 @@ [/endlevel] [/event] - {DEFAULT_VICTORY 0.3} + {DEFAULT_VICTORY 0.3} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg index 3c185113edbe..8154562905ec 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg @@ -40,7 +40,7 @@ share_view=yes no_leader=yes {PLAYER_TEAM} - save_id=Kalenz + save_id=Kalenz [unit] {KALENZ} x=12 @@ -66,8 +66,8 @@ [side] side=2 no_leader=yes - save_id=Landar - {PLAYABLE} + save_id=Landar + {PLAYABLE} [unit] {LANDAR} x=11 @@ -79,8 +79,8 @@ [side] side=3 no_leader=yes - save_id=Olurf - {PLAYABLE} + save_id=Olurf + {PLAYABLE} [unit] {OLURF} x=11 @@ -92,8 +92,8 @@ [side] side=4 no_leader=yes - save_id=Cleodil - {PLAYABLE} + save_id=Cleodil + {PLAYABLE} [unit] {CLEODIL} x=11 diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/14_Human_Alliance.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/14_Human_Alliance.cfg index 3f2159a46865..85e6fa5f6e69 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/14_Human_Alliance.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/14_Human_Alliance.cfg @@ -115,7 +115,7 @@ Chapter Four" fog=no side=2 no_leader=yes - {PLAYABLE} + {PLAYABLE} [unit] id=Aldar type=General @@ -223,7 +223,7 @@ Chapter Four" {PLAYABLE} fog=no save_id=Galtrid - previous_save_id=Kalenz + previous_save_id=Kalenz #ifdef MULTIPLAYER {MULTIPLAYER_GOLD} #else @@ -395,7 +395,7 @@ Chapter Four" shroud=no no_leader=yes {PLAYABLE} - save_id=Landar + save_id=Landar [unit] {LANDAR} @@ -411,7 +411,7 @@ Chapter Four" fog=no shroud=no no_leader=yes - save_id=Olurf + save_id=Olurf [unit] {OLURF} @@ -429,7 +429,7 @@ Chapter Four" fog=no shroud=no {PLAYABLE} - save_id=Cleodil + save_id=Cleodil no_leader=yes [unit] {CLEODIL} @@ -447,8 +447,8 @@ Chapter Four" shroud=no {PLAYABLE} no_leader=yes - previous_save_id=Landar - save_id=El_Isomithir + previous_save_id=Landar + save_id=El_Isomithir [unit] {EL_ISOMITHIR} x=13 @@ -464,8 +464,8 @@ Chapter Four" fog=no shroud=no {PLAYABLE} - save_id=Eradion - previous_save_id=Cleodil + save_id=Eradion + previous_save_id=Cleodil no_leader=yes [unit] {ERADION} @@ -681,7 +681,7 @@ Chapter Four" [/message] [/event] - {DEFAULT_VICTORY 0.3} + {DEFAULT_VICTORY 0.3} {campaigns/Legend_of_Wesmere/utils/deaths.cfg} [/scenario] diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/17_Breaking_the_Siege.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/17_Breaking_the_Siege.cfg index 38be9ba1beb8..7ce0daf8de97 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/17_Breaking_the_Siege.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter4/17_Breaking_the_Siege.cfg @@ -213,7 +213,7 @@ side=6 save_id=Landar fog=yes - {PLAYABLE} + {PLAYABLE} no_leader=yes [unit] {LANDAR} @@ -226,7 +226,7 @@ [side] side=7 save_id=Olurf - {PLAYABLE} + {PLAYABLE} no_leader=yes [unit] @@ -241,7 +241,7 @@ [side] side=8 save_id=Cleodil - {PLAYABLE} + {PLAYABLE} {MULTIPLAYER_GOLD} fog=yes diff --git a/data/campaigns/Legend_of_Wesmere/scenarios/chapter5/19_Costly_Revenge.cfg b/data/campaigns/Legend_of_Wesmere/scenarios/chapter5/19_Costly_Revenge.cfg index 8b13173cb5bd..70485ff71bfc 100644 --- a/data/campaigns/Legend_of_Wesmere/scenarios/chapter5/19_Costly_Revenge.cfg +++ b/data/campaigns/Legend_of_Wesmere/scenarios/chapter5/19_Costly_Revenge.cfg @@ -184,7 +184,7 @@ Chapter Five" {PLAYABLE} {MULTIPLAYER_GOLD} - save_id=Landar + save_id=Landar no_leader=yes [unit] {LANDAR} diff --git a/data/campaigns/Legend_of_Wesmere/utils/characters.cfg b/data/campaigns/Legend_of_Wesmere/utils/characters.cfg index 699370c12f00..7f6f2a97aa80 100644 --- a/data/campaigns/Legend_of_Wesmere/utils/characters.cfg +++ b/data/campaigns/Legend_of_Wesmere/utils/characters.cfg @@ -11,7 +11,7 @@ {PLAYER_TEAM} village_gold=1 persistent=yes - allow_player=yes + allow_player=yes #ifdef MULTIPLAYER team_lock=yes gold_lock=yes diff --git a/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg b/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg index b5a9db85ef8e..b4bb9ae8a1e9 100644 --- a/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg +++ b/data/campaigns/Legend_of_Wesmere/utils/low-macros.cfg @@ -2,34 +2,34 @@ #ifdef MULTIPLAYER #define MP_SIDE NUM WML - [side] - side={NUM} - {WML} - [/side] + [side] + side={NUM} + {WML} + [/side] #enddef #else #define MP_SIDE NUM WML - [side] - side={NUM} - hidden=yes - controller=null - allow_player=no - no_leader=yes - [/side] + [side] + side={NUM} + hidden=yes + controller=null + allow_player=no + no_leader=yes + [/side] #enddef #endif #define DEFAULT_VICTORY MP_BONUS - [event] - name=enemies defeated - [endlevel] + [event] + name=enemies defeated + [endlevel] #ifdef MULTIPLAYER - bonus={MP_BONUS} + bonus={MP_BONUS} #else - bonus=yes + bonus=yes #endif - [/endlevel] - [/event] + [/endlevel] + [/event] #enddef #define FILTER_LOYALS diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg index d6991c039636..74e3f839ae32 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg @@ -621,7 +621,7 @@ [not] [filter] [/filter] - [/not] + [/not] ) ( side=2 upkeep=free From 5418ddfc24955de2e83addb150b9dd6848bdfb71 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 16:46:54 +1100 Subject: [PATCH 55/57] tsynced_choice_wait: removed now-unused CVideo parameter from pre_show --- src/gui/dialogs/synced_choice_wait.cpp | 2 +- src/gui/dialogs/synced_choice_wait.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index 716892f0f719..b36558d5401a 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -67,7 +67,7 @@ tsynced_choice_wait::~tsynced_choice_wait() mgr_.changed_event_.detach_handler(this); } -void tsynced_choice_wait::pre_show(CVideo& video, twindow& window) +void tsynced_choice_wait::pre_show(twindow& window) { window_ = &window; message_ = find_widget(&window, "lblMessage", false, true); diff --git a/src/gui/dialogs/synced_choice_wait.hpp b/src/gui/dialogs/synced_choice_wait.hpp index 7c5fe4e2fa68..93400dca0c50 100644 --- a/src/gui/dialogs/synced_choice_wait.hpp +++ b/src/gui/dialogs/synced_choice_wait.hpp @@ -35,7 +35,7 @@ class tsynced_choice_wait : public tdialog, public events::observer virtual const std::string& window_id() const; /** Inherited from tdialog. */ - void pre_show(CVideo& video, twindow& window); + void pre_show(twindow& window); virtual void handle_generic_event(const std::string& event_name); }; From 096d257624e1ab35076dc89a13046965de362ab5 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 16:54:16 +1100 Subject: [PATCH 56/57] Redo 5418ddfc2495 properly --- src/gui/dialogs/synced_choice_wait.cpp | 2 +- src/gui/dialogs/synced_choice_wait.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/synced_choice_wait.cpp b/src/gui/dialogs/synced_choice_wait.cpp index b36558d5401a..c63b6fa0017b 100644 --- a/src/gui/dialogs/synced_choice_wait.cpp +++ b/src/gui/dialogs/synced_choice_wait.cpp @@ -67,7 +67,7 @@ tsynced_choice_wait::~tsynced_choice_wait() mgr_.changed_event_.detach_handler(this); } -void tsynced_choice_wait::pre_show(twindow& window) +void tsynced_choice_wait::pre_show(CVideo& /*video*/, twindow& window) { window_ = &window; message_ = find_widget(&window, "lblMessage", false, true); diff --git a/src/gui/dialogs/synced_choice_wait.hpp b/src/gui/dialogs/synced_choice_wait.hpp index 93400dca0c50..7c5fe4e2fa68 100644 --- a/src/gui/dialogs/synced_choice_wait.hpp +++ b/src/gui/dialogs/synced_choice_wait.hpp @@ -35,7 +35,7 @@ class tsynced_choice_wait : public tdialog, public events::observer virtual const std::string& window_id() const; /** Inherited from tdialog. */ - void pre_show(twindow& window); + void pre_show(CVideo& video, twindow& window); virtual void handle_generic_event(const std::string& event_name); }; From a33a6698580b7a0ae79b54eb704e1ba94ea646b5 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Wed, 24 Feb 2016 16:54:34 +1100 Subject: [PATCH 57/57] Mark quit_confirmation constructor as explicit --- src/quit_confirmation.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quit_confirmation.hpp b/src/quit_confirmation.hpp index 3b6ec7cef1cd..2648f59f73a3 100644 --- a/src/quit_confirmation.hpp +++ b/src/quit_confirmation.hpp @@ -31,7 +31,7 @@ class CVideo; class quit_confirmation { public: - quit_confirmation(const boost::function& prompt = &quit_confirmation::default_prompt) + explicit quit_confirmation(const boost::function& prompt = &quit_confirmation::default_prompt) : prompt_(prompt) { blockers_.push_back(this); } ~quit_confirmation() { blockers_.pop_back(); }