[global]
descname=_Ferner
help=Grows Fern
type=generic
menu_pic=ferner_menu.png
program=plant
program=harvest

[buildcost]
carrier=1
shovel=1

[plant]
0=setdescription tribe:fern0        # 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

[harvest]
0=findobject attrib:grown_fern 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 harvest								# cause the object to change its program (to 'fall')
4=animation idle 2000					# wait for the tree to disappear
5=createitem thatchfern             # 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
