mail[Wesnoth-commits] r20410 - in /trunk: changelog src/play_controller.cpp src/replay.cpp


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

Header


Content

Posted by patrick_X99 on September 15, 2007 - 20:07:
Author: sapient
Date: Sat Sep 15 20:06:55 2007
New Revision: 20410

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20410&view=rev
Log:
feature request #9990: post-heal "side turn"-like event hook
   * new event "turn refresh" occurs after healing, calculating income, and
     restoring movement (note: this intentionally excludes the first turn)

Modified:
    trunk/changelog
    trunk/src/play_controller.cpp
    trunk/src/replay.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=20410&r1=20409&r2=20410&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Sep 15 20:06:55 2007
@@ -78,6 +78,8 @@
    * add an "Animate Map" option in advanced preferences, to switch flag and
      terrain animation off
  * WML engine:
+   * new event "turn refresh" occurs after healing, calculating income, and
+     restoring movement (note: this intentionally excludes the first turn)
    * now tag [filter_adjacent] is supported in the Standard Unit Filter (SUF)
    * now tag [filter_adjacent_location] is supported in the Standard Location
      Filter (SLF)

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=20410&r1=20409&r2=20410&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Sat Sep 15 20:06:55 2007
@@ -363,6 +363,7 @@
 
                calculate_healing((*gui_),map_,units_,player_number_,teams_, 
!recorder.is_skipping());
                reset_resting(units_, player_number_);
+               game_events::fire("turn refresh");
        }
 
        const time_of_day &tod = status_.get_time_of_day();

Modified: trunk/src/replay.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.cpp?rev=20410&r1=20409&r2=20410&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Sat Sep 15 20:06:55 2007
@@ -1079,7 +1079,7 @@
                        const std::string event = (*child)["raise"];
                        //exclude these events here, because in a replay 
proper time of execution can't be
                        //established and therefore we fire those events 
inside play_controller::init_side
-                       if ((event != "side turn") && (event != "turn 1") && 
(event != "new_turn")){
+                       if ((event != "side turn") && (event != "turn 1") && 
(event != "new turn") && (event != "turn refresh")){
                                const config* const source = 
child->child("source");
                                if(source != NULL) {
                                        game_events::fire(event, 
gamemap::location(*source, game_events::get_state_of_game()));




Related Messages


Powered by MHonArc, Updated Sat Sep 15 22:40:32 2007