mail[Wesnoth-commits] r27334 - /trunk/src/game_events.cpp


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

Header


Content

Posted by cycholka on June 20, 2008 - 11:40:
Author: cycholka
Date: Fri Jun 20 11:39:58 2008
New Revision: 27334

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27334&view=rev
Log:
Introduce delayed_variable_substitution key to [even] tag allowing to choose 
between immediate (current behavior) and delayed (old behavior) substitution. 
If not used defaults to 'yes'.

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=27334&r1=27333&r2=27334&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Fri Jun 20 11:39:58 2008
@@ -2873,8 +2873,16 @@
                // Adding of new events
        WML_HANDLER_FUNCTION(event,/*handler*/,/*event_info*/,cfg)
        {
-               const config &parsed = cfg.get_parsed_config();
-               
new_handlers.push_back(game_events::event_handler(vconfig(&parsed, &parsed)));
+        std::string behaviour_flag = cfg["delayed_variable_substitution"];
+        if(behaviour_flag == "no")
+        {
+               const config &parsed = cfg.get_parsed_config();
+                   
new_handlers.push_back(game_events::event_handler(vconfig(&parsed, &parsed)));
+        }
+        else
+        {
+            new_handlers.push_back(game_events::event_handler(cfg));
+        }
        }
 
 




Related Messages


Powered by MHonArc, Updated Fri Jun 20 12:02:45 2008