Static Dictionary not initializing properly

For a mining game I have a public static dictionary that I was hoping to use to sort for calling by id, but I can’t get it to call values from the dictionary. If I call a debug.log(dictionary.count.tostring()) it shows me that it is in fact 16 long, but all the values are null. I don’t understand, and am currently calling item specifically, but this will make it very hard for me to call random items from a pool down the road.

public static class Resources {

	public static Dictionary<int, Item> ResourceDictionary = new Dictionary<int, Item> {
		{0, null},
		{1, Resources.RawOre},
		{2, Resources.Gem},
		//etc
		};
	}


PlayerScript.AddItem(Resources.RawOre, 10);
//^^^^this works fine, calling directly
for (int i = 0; i < newGems; i++){
	int gemType = Random.Range (10,15);
	PlayerScript.AddItem(Resources.ResourceDictionary[gemType], 1);
//calling through the dict returns null reference exception
}

Oh man, are Resources.Gem and the others stored as objects in the Resources class?
If so, you may be going about this the wrong way (or a less than ideal way, because who is to say what is right or wrong).

You want to make sure you are instantiating those objects as well, in order to add them to the dictionary (otherwise you’ll end up with 16 valid keys with ‘null’ as the value since that is the value of those objects before they are instantiated).

Really all you want to store in that dictionary is a type, as far as I can tell. Or some way to know which type of resource to add to another list later. Instead of keeping them as objects, perhaps you could create an enum

public enum Item
{
  None = 0,
  Rock,
  Gem,
  Etc...
}

You’d have to drop the ‘null’ for Item.None, but for the most part your code could stay.