Author: ai0867
Date: Fri Oct  3 15:58:02 2008
New Revision: 29825

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29825&view=rev
Log:
* Add new [end_turn] command.

Modified:
    trunk/changelog
    trunk/data/scenario-test.cfg
    trunk/src/game_events.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=29825&r1=29824&r2=29825&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Fri Oct  3 15:58:02 2008
@@ -44,6 +44,7 @@
    * New command, [store_time_of_day], makes it possible to store ToD info
      in a WML array/container.
    * Changed underlying_id in unit to be unique number
+   * New command, [end_turn], ends the current side's turn.
  * AI
    * Made it possible to use formula AI for recruiting when using default ai
    * Changed defaults for AI parameters: village_value, villages_per_scout,

Modified: trunk/data/scenario-test.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-test.cfg?rev=29825&r1=29824&r2=29825&view=diff
==============================================================================
--- trunk/data/scenario-test.cfg (original)
+++ trunk/data/scenario-test.cfg Fri Oct  3 15:58:02 2008
@@ -669,6 +669,10 @@
         x,y=9,3
         text="Win"
     [/label]
+    [label]
+        x,y=7,3
+        text="Timeshift"
+    [/label]
 
     [label]
         x,y=14,9
@@ -698,6 +702,15 @@
             name=endlevel
             variable=endlevel_test
         [/insert_tag]
+    [/event]
+    [event]
+        name="moveto"
+        first_time_only=no
+        [filter]
+            x,y=7,3
+        [/filter]
+        [end_turn]
+        [/end_turn]
     [/event]
 
     [event]

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=29825&r1=29824&r2=29825&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Fri Oct  3 15:58:02 2008
@@ -2555,6 +2555,11 @@
                }
        }
 
+       WML_HANDLER_FUNCTION(end_turn,/*handler*/,/*event_info*/,cfg)
+       {
+               throw end_turn_exception();
+       }
+
        WML_HANDLER_FUNCTION(endlevel,/*handler*/,/*event_info*/,cfg)
        {
                // Remove 0-hp units from the unit map to avoid the following 
problem:


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to