mail[Wesnoth-commits] r44679 - /trunk/data/scenario-test.cfg


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

Header


Content

Posted by guillaume . melquiond on July 25, 2010 - 17:34:
Author: silene
Date: Sun Jul 25 17:34:09 2010
New Revision: 44679

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44679&view=rev
Log:
Added some tests for the recall functions.

Modified:
    trunk/data/scenario-test.cfg

Modified: trunk/data/scenario-test.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-test.cfg?rev=44679&r1=44678&r2=44679&view=diff
==============================================================================
--- trunk/data/scenario-test.cfg (original)
+++ trunk/data/scenario-test.cfg Sun Jul 25 17:34:09 2010
@@ -352,8 +352,6 @@
                 local args = ...
                 local team = wesnoth.get_side(args.side);
                 team.gold = team.gold + args.gold;
-                local x, y = wesnoth.find_vacant_tile(14, 6)
-                wesnoth.put_unit(x, y, { type = "Elvish Lady", side = 3 })
             >>
             [args]
                 side=1
@@ -1575,6 +1573,21 @@
             x,y="recall","recall"
             type=Ancient Wose
         [/unit]
+
+        [lua]
+            code=<<
+                wesnoth.put_recall_unit { type = "Elvish Lady" }
+                local u = wesnoth.get_recall_units()[2]
+                local l = wesnoth.get_units { side = 1, canrecruit = true 
}[1]
+                local x, y = wesnoth.find_vacant_tile(l.x, l.y, u)
+                u.side = 3
+                wesnoth.put_unit(x, y, u)
+                local ul = wesnoth.get_recall_units()
+                local t = {}
+                for i,u in ipairs(ul) do table.insert(t, u.type) end
+                wesnoth.message(string.format("Recall list: %s", 
table.concat(t, ',')))
+            >>
+        [/lua]
     [/event]
 
     [label]




Related Messages


Powered by MHonArc, Updated Sun Jul 25 17:40:14 2010