Deprecated RECALL_OR_CREATE_UNIT and RECALL_OR_CREATE.

This commit is contained in:
Steven Panek 2010-11-25 10:22:11 +00:00
parent 8dfad246d7
commit 55214bc67f
2 changed files with 39 additions and 35 deletions

View file

@ -446,3 +446,42 @@
image=scenery/pine1.png
[/item]
#enddef
#define RECALL_OR_CREATE_UNIT WML ID_STRING
{DEPRECATE RECALL_OR_CREATE_UNIT 1.9.4}
# A substitute for [recall] that works even when there's no-one to recall
# useful for testing scenarios out of order.
[recall]
id={ID_STRING}
[/recall]
[if]
[have_unit]
id={ID_STRING}
[/have_unit]
[else]
[store_starting_location]
side=1
variable=tmp
[/store_starting_location]
[unit]
{WML}
side=1
x=$tmp.x
y=$tmp.y
[/unit]
[clear_variable]
name=tmp
[/clear_variable]
[/else]
[/if]
#enddef
#define RECALL_OR_CREATE TYPE ID_STRING
{DEPRECATE RECALL_OR_CREATE 1.9.4}
# 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

View file

@ -183,41 +183,6 @@
[/unit]
#enddef
#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]
id={ID_STRING}
[/recall]
[if]
[have_unit]
id={ID_STRING}
[/have_unit]
[else]
[store_starting_location]
side=1
variable=tmp
[/store_starting_location]
[unit]
{WML}
side=1
x=$tmp.x
y=$tmp.y
[/unit]
[clear_variable]
name=tmp
[/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_NAME
# Stores an attribute of a unit to the given variable.
#