Added the CREATE_OR_RECALL_UNIT macro...

...which takes a full set of [unit] attributes as argument.
This commit is contained in:
Fabian Müller 2009-04-05 11:04:09 +00:00
parent 19e0e8eb41
commit 173239dd4f

View file

@ -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
@ -207,6 +206,13 @@
[/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
# Stores an attribute of a unit to the given variable.
#