[global]
descname=_Wine-Grower
help=Grows Wine
type=generic
menu_pic=menu.png
program=plantwine
program=harvestwine

[buildcost]
carrier=1
shovel=1
basket=1

[plantwine]
0=setdescription tribe:wine0                    # Set a random immovable description
1=findspace size:any radius:1			        # Find space for the description within the given radius
2=walk coords								    # Walk to the target coordinates
3=animation idle 500						    # Play a planting animation
4=plant										    # Place an immovable of the selected description
5=animation idle 500						    # Wait a while
6=return										# Go back home

[harvestwine]
0=findobject attrib:grown_wine radius:2	        # find an object matching the given criteria, put it into the object slot
1=walk object								    # walk to the object in the object slot
2=animation idle 10000				            # play an animation 
3=object harvestwine							# cause the object to change its program (to 'fall')
4=animation idle 2000					        # wait for the tree to disappear
5=createitem grape                               # create & carry the given item
6=return										# return home

# The normal idle animation (non-directional)
[idle]
pics=idle_??.png
clrkey_r=255
clrkey_g=249
clrkey_b=137
hot_spot_x=5
hot_spot_y=13

# Walking empty-handed
[walk]
dirpics=walk_!!_??.png
clrkey_r=255
clrkey_g=249
clrkey_b=137
hot_spot_x=5
hot_spot_y=13

# Walking with a ware
[walkload]
dirpics=walk_!!_??.png
clrkey_r=255
clrkey_g=249
clrkey_b=137
hot_spot_x=5
hot_spot_y=13
