mail[Wesnoth-commits] r33775 - in /trunk: changelog data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg src/dialogs.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on March 17, 2009 - 21:26:
Author: soliton
Date: Tue Mar 17 21:26:18 2009
New Revision: 33775

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33775&view=rev
Log:
* Added an 'always_display' key to [advancement] to make it possible to show 
the advance dialog even with just one option and use it for Kaleh's AMLAs.

Modified:
    trunk/changelog
    trunk/data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg
    trunk/src/dialogs.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=33775&r1=33774&r2=33775&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Tue Mar 17 21:26:18 2009
@@ -8,6 +8,8 @@
    * Grey game titles out when we're missing the era
  * WML Engine:
    * Increase the map size limit to 1000 by 1000
+   * Added an 'always_display' key to [advancement] to make it possible to 
show
+     the advance dialog even with just one option.
  * Miscellaneous and bug fixes:
    * Fixed bug #13204: NR: Death event doesn't re-spawn Malifor as expected
    * Fixed bug #13198: Corrupt replay in MP

Modified: trunk/data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg?rev=33775&r1=33774&r2=33775&view=diff
==============================================================================
--- trunk/data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg (original)
+++ trunk/data/campaigns/Under_the_Burning_Suns/units/Kaleh.cfg Tue Mar 17 
21:26:18 2009
@@ -12,6 +12,7 @@
 #define KALEH_ADVANCEMENT HP_RAISE XP EFFECT VARIATION
     [advancement]
         max_times=1
+        always_display=yes
         [effect]
             apply_to=hitpoints
             increase_total={HP_RAISE}

Modified: trunk/src/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/dialogs.cpp?rev=33775&r1=33774&r2=33775&view=diff
==============================================================================
--- trunk/src/dialogs.cpp (original)
+++ trunk/src/dialogs.cpp Tue Mar 17 21:26:18 2009
@@ -85,8 +85,9 @@
        }
 
        const config::child_list& mod_options = 
u->second.get_modification_advances();
-
+       bool always_display = false;
        for(config::child_list::const_iterator mod = mod_options.begin(); mod 
!= mod_options.end(); ++mod) {
+               if (utils::string_bool((**mod)["always_display"])) 
always_display = true;
                
sample_units.push_back(::get_advanced_unit(units,loc,u->second.type_id()));
                sample_units.back().add_modification("advance",**mod);
                const unit& type = sample_units.back();
@@ -109,7 +110,7 @@
                return;
        } else if(random_choice) {
                res = rand()%lang_options.size();
-       } else if(lang_options.size() > 1) {
+       } else if(lang_options.size() > 1 || always_display) {
 
                units_list_preview_pane unit_preview(gui,&map,sample_units);
                std::vector<gui::preview_pane*> preview_panes;




Related Messages


Powered by MHonArc, Updated Tue Mar 17 21:40:32 2009