using UnityEngine;

public static class ItemGen 
{
	public static Item CreateItem(int ItemID)
	{
		Item temp = new Item();
		string name = "";
		int amount = 0;
		string icon = "";
		string mesh = "";

		switch(ItemID)
		{
			#region Consumables 0-99
		case 0:
			name = "Sticks";
			amount = 1;
			icon = "Stick";
			mesh = "Stick";
			break;
		case 1:
			name = "Vines";
			amount = 1;
			icon = "Vine";
			mesh = "Vine";
			break;
		case 2:
			name = "Rocks";
			amount = 1;
			icon = "Rock";
			mesh = "Rock";
			break;
		case 3:
			name = "Logs";
			amount = 1;
			icon = "Log";
			mesh = "Log";
			break;
		case 4:
			name = "Grass";
			amount = 1;
			icon = "Grass";
			mesh = "Grass";
			break;
			#endregion
			#region Craftables 100-199
		case 100:
			name = "Fire";
			icon = "Fire";
			mesh = "Fire";
			break;
		case 101:
			name = "Bridge";
			icon = "Bridge";
			mesh = "Bridge";
			break;
		case 102:
			name = "Sling Shot";
			icon = "Slingshot";
			mesh = "Slingshot";
			break;
			#endregion

		default:
			ItemID = 0;
			name = "Rocks";
			amount = 1;
			icon = "Rock";
			mesh = "Rock";
			break;
		}

		temp.Name = name;
		temp.ID = ItemID;
		temp.Amount = amount;
		temp.Icon = Resources.Load("Icons/"+icon)as Texture2D;
		temp.MeshName = mesh;


		return temp;
	}
}
