Author: fendrin
Date: Sun Apr  5 13:04:09 2009
New Revision: 34532

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34532&view=rev
Log:
Added the CREATE_OR_RECALL_UNIT maro which takes a full set of [unit] 
attributes as argument.

Modified:
    trunk/data/core/macros/unit-utils.cfg

Modified: trunk/data/core/macros/unit-utils.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/macros/unit-utils.cfg?rev=34532&r1=34531&r2=34532&view=diff
==============================================================================
--- trunk/data/core/macros/unit-utils.cfg (original)
+++ trunk/data/core/macros/unit-utils.cfg Sun Apr  5 13:04:09 2009
@@ -178,7 +178,7 @@
     [/unit]
 #enddef
 
-#define RECALL_OR_CREATE TYPE ID_STRING
+#define RECALL_OR_CREATE_UNIT WML ID_STRING
     # A substitute for [recall] that works even when there's no-one to recall
     # useful for testing scenarios out of order.
     [recall]
@@ -194,8 +194,7 @@
                 variable=tmp
             [/store_starting_location]
             [unit]
-                type={TYPE}
-                id={ID_STRING}
+                {WML}
                 side=1
                 x=$tmp.x
                 y=$tmp.y
@@ -205,6 +204,13 @@
             [/clear_variable]
         [/else]
     [/if]
+#enddef
+
+#define RECALL_OR_CREATE TYPE ID_STRING
+    # A substitute for [recall] that works even when there's no-one to recall
+    # useful for testing scenarios out of order.
+    {RECALL_OR_CREATE_UNIT (type={TYPE}
+                            id={ID_STRING}) {ID_STRING}}
 #enddef
 
 #define STORE_UNIT_VAR FILTER VAR TO_VAR


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

Reply via email to