/**************************************************************************

template_resource.tgi
Copyright © 2002-2003 TimeGate Studios

DESCRIPTION: templates for resources

REVISION HISTORY:
drp090402 - created

REQUIRES:

	First define a game-specific [template ResourceList] that is processes
	prior to any template files.  Put it in its own TGI (such as "resource_list.tgi")
	and process it prior to template_resource.tgi.  This template contains one
	line per resource IDS that the game will define. Example:
	
[template ResourceList]
{
	fixed gold = 0
	fixed wood = 0
	fixed iron = 0
}

USAGE:

	[template ResourceList]
	This should be defined prior to your list of Resource nodes, it should list all the resource
	IDSes that are available. It should also be defined prior to the Actor template.

	[Resource template=Resource]
	This node represents a resource that is used to purchase things or to upkeep things.
	Use a more specific template

	[Resource template=PurchaseResource]
	Use this to define a purchase resource (such as gold). E.g.
		
	[Resource template=UpkeepResource]
	To define an upkeep resource (such as wood, iron, etc) use the following.  
	This node should contain one field per PurchaseResource, where the field name is the IDS.  
	Note that these must have been previously defined, so all PurchaseResources should 
	be defined before UpkeepResources.

EXAMPLES:

[Resource template=PurchaseResource]
{
	IDS = gold
	name = Gold
}
	
[Resource template=UpkeepResource]	
{
	IDS = wood
	name = Wood
	
	[PurchaseCost]
	{
		gold = 1
	}
}

[Resource template=UpkeepResource]
{
	IDS = food_provided
	name = Food_Provided
}

[Resource template=LimitedConsumedResource]
{
	IDS = food_consumed
	name = Food_Consumed
	
	limited_by = food_provided
}
**************************************************************************/

[template Resource]
{
	string		IDS
	localized	name

	;; (optional)
	localized	description = ""
	
	;; type = STOCKPILED (gold), UPKEEP (wood, oil, unit limt provided),
	;;        LIMITED_CONSUMED (unit limit consumed)
	string		type
	
	;; if type is LIMITED_CONSUMED, then this should point to the UPKEEP resource
	;; There should be only one LIMITED_CONSUMED per UPKEEP and vice versa
	string		limited_by = null
	
	string		icon ;; special glyph IDS
} ; end [Template Resource]

[template PurchaseResource inherit=Resource]
{
	type = STOCKPILED
}

[template UpkeepResource inherit=Resource]
{
	type = UPKEEP
	
	[PurchaseCost template=CostList]
	;; PurchaseCost contains one field per resource IDS
}

[template LimitedConsumedResource inherit=Resource]
{
	type = LIMITED_CONSUMED
}
